- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 172 for get_client (0.13 sec)
-
tests/test_tutorial/test_query_param_models/test_tutorial001.py
"tutorial001_an", pytest.param("tutorial001_an_py39", marks=needs_py39), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.query_param_models.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.query_params_str_validations.tutorial010_an import app client = TestClient(app) return client def test_query_params_str_validations_no_query(client: TestClient): response = client.get("/items/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010_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.query_params_str_validations.tutorial010_py310 import app client = TestClient(app) return client @needs_py310 def test_query_params_str_validations_no_query(client: TestClient): response = client.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial003 import app client = TestClient(app) return client def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={ "importance": 2,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.4K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial005_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.path_operation_configuration.tutorial005_py310 import app client = TestClient(app) return client @needs_py310 def test_query_params_str_validations(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 8.9K bytes - Viewed (0) -
tests/test_tutorial/test_body_fields/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_fields.tutorial001 import app client = TestClient(app) return client def test_items_5(client: TestClient): response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}}) assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_fields/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_fields.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 def test_items_5(client: TestClient): response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
"tutorial001_an", pytest.param("tutorial001_an_py39", marks=needs_py39), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.cookie_param_models.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
from fastapi import Depends, FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from .utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from pydantic import BaseModel, ValidationInfo, field_validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an.py
import pytest from fastapi.testclient import TestClient from tests.utils import needs_pydanticv1 @pytest.fixture(name="client") def get_client(): from docs_src.request_form_models.tutorial002_pv1_an import app client = TestClient(app) return client # TODO: remove when deprecating Pydantic v1 @needs_pydanticv1 def test_post_body_form(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.4K bytes - Viewed (0)