Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for incorrectly (0.04 sec)

  1. tests/test_compat.py

        assert is_uploadfile_sequence_annotation(Union[list[str], list[UploadFile]])
    
    
    def test_serialize_sequence_value_with_optional_list():
        """Test that serialize_sequence_value handles optional lists correctly."""
        from fastapi._compat import v2
    
        field_info = FieldInfo(annotation=Union[list[str], None])
        field = v2.ModelField(name="items", field_info=field_info)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial003.py

    
    def test_login_incorrect_password(client: TestClient):
        response = client.post(
            "/token", data={"username": "johndoe", "password": "incorrect"}
        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    def test_login_incorrect_username(client: TestClient):
        response = client.post("/token", data={"username": "foo", "password": "secret"})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial007.py

        assert response.json() == {"detail": "Incorrect username or password"}
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_password(client: TestClient):
        response = client.get("/users/me", auth=("stanleyjobson", "wrongpassword"))
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_optional.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        argnames=["grant_type"],
        argvalues=[
            pytest.param("incorrect", id="incorrect value"),
            pytest.param("passwordblah", id="password with suffix"),
            pytest.param("blahpassword", id="password with prefix"),
        ],
    )
    def test_strict_login_incorrect_grant_type(grant_type: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial005.py

    def test_login_incorrect_password(mod: ModuleType):
        client = TestClient(mod.app)
        response = client.post(
            "/token", data={"username": "johndoe", "password": "incorrect"}
        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    def test_login_incorrect_username(mod: ModuleType):
        client = TestClient(mod.app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial004.py

    def test_login_incorrect_password(mod: ModuleType):
        client = TestClient(mod.app)
        response = client.post(
            "/token", data={"username": "johndoe", "password": "incorrect"}
        )
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    def test_login_incorrect_username(mod: ModuleType):
        client = TestClient(mod.app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 13.3K bytes
    - Viewed (0)
  7. tests/test_security_oauth2.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        argnames=["grant_type"],
        argvalues=[
            pytest.param("incorrect", id="incorrect value"),
            pytest.param("passwordblah", id="password with suffix"),
            pytest.param("blahpassword", id="password with prefix"),
        ],
    )
    def test_strict_login_incorrect_grant_type(grant_type: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional_description.py

                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        argnames=["grant_type"],
        argvalues=[
            pytest.param("incorrect", id="incorrect value"),
            pytest.param("passwordblah", id="password with suffix"),
            pytest.param("blahpassword", id="password with prefix"),
        ],
    )
    def test_strict_login_incorrect_grant_type(grant_type: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

                                        "normal": {
                                            "summary": "A normal example",
                                            "description": "A **normal** item works correctly.",
                                            "value": {
                                                "name": "Foo",
                                                "description": "A very nice Item",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  10. scripts/translate.py

            [Pull Requests erzeugen](help-fastapi.md#create-a-pull-request){.internal-link target=_blank}
            »»»
    
    5) Do not translate anchor fragments in links (the part after «#»), as they must remain the same to work correctly.
    
    5.1) If an existing translation has a link with an anchor fragment different to the anchor fragment in the English source, then this is an error. Fix this by using the anchor fragment of the English source.
    
    Example:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
Back to top