Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 592 for Leeds (0.15 sec)

  1. tests/test_tutorial/test_settings/test_app02.py

    from pytest import MonkeyPatch
    
    from ...utils import needs_pydanticv2
    
    
    @needs_pydanticv2
    def test_settings(monkeypatch: MonkeyPatch):
        from docs_src.settings.app02 import main
    
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        settings = main.get_settings()
        assert settings.app_name == "Awesome API"
        assert settings.items_per_user == 50
    
    
    @needs_pydanticv2
    def test_override_settings():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 488 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial010_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_query_params_str_validations_no_query(client: TestClient):
        response = client.get("/items/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. tests/test_jsonable_encoder.py

    from typing import Optional
    
    import pytest
    from fastapi._compat import PYDANTIC_V2, Undefined
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel, Field, ValidationError
    
    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    class Pet:
        def __init__(self, owner: Person, name: str):
            self.owner = owner
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params_str_validations/test_tutorial014_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial014_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_hidden_query(client: TestClient):
        response = client.get("/items?hidden_query=somevalue")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial003_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_login(client: TestClient):
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_updates/test_tutorial001_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310, needs_pydanticv1, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_updates.tutorial001_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_get(client: TestClient):
        response = client.get("/items/baz")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

    from base64 import b64encode
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial006_an import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_security_http_basic(client: TestClient):
        response = client.get("/users/me", auth=("john", "secret"))
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial001_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_q_bar_content(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial011_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_multi_query_values(client: TestClient):
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
Back to top