Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 406 for Leeds (0.14 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        return access_token
    
    
    @needs_py39
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
        assert response.status_code == 200, response.text
        content = response.json()
        assert "access_token" in content
        assert content["token_type"] == "bearer"
    
    
    @needs_py39
    def test_login_incorrect_password(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_py310.py

        return access_token
    
    
    @needs_py310
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
        assert response.status_code == 200, response.text
        content = response.json()
        assert "access_token" in content
        assert content["token_type"] == "bearer"
    
    
    @needs_py310
    def test_login_incorrect_password(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_py39.py

        return access_token
    
    
    @needs_py39
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
        assert response.status_code == 200, response.text
        content = response.json()
        assert "access_token" in content
        assert content["token_type"] == "bearer"
    
    
    @needs_py39
    def test_login_incorrect_password(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_get_user(client):
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        data = response.json()
        assert "email" in data
        assert "id" in data
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_nonexistent_user(client):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_get_user(client):
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        data = response.json()
        assert "email" in data
        assert "id" in data
    
    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_nonexistent_user(client):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_get_user(client):
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        data = response.json()
        assert "email" in data
        assert "id" in data
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_nonexistent_user(client):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_get_user(client):
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        data = response.json()
        assert "email" in data
        assert "id" in data
    
    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_nonexistent_user(client):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  8. tests/utils.py

    import sys
    
    import pytest
    from fastapi._compat import PYDANTIC_V2
    
    needs_py39 = pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9+")
    needs_py310 = pytest.mark.skipif(
        sys.version_info < (3, 10), reason="requires python3.10+"
    )
    needs_pydanticv2 = pytest.mark.skipif(not PYDANTIC_V2, reason="requires Pydantic v2")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 422 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_testing_databases_py39.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    
    from ...utils import needs_py39, needs_pydanticv1
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_testing_dbs_py39(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./test.db")
        if test_db.is_file():  # pragma: nocover
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 822 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client() -> TestClient:
        from docs_src.separate_openapi_schemas.tutorial001_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_create_item(client: TestClient) -> None:
        response = client.post("/items/", json={"name": "Foo"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 4.9K bytes
    - Viewed (0)
Back to top