- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 171 for getClient (0.08 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial008d.py
import pytest from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008d import app client = TestClient(app) return client def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.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_an 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_body_multiple_params/test_tutorial003_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.body_multiple_params.tutorial003_an_py310 import app client = TestClient(app) return client @needs_py310 def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/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.body_multiple_params.tutorial003_an_py39 import app client = TestClient(app) return client @needs_py39 def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39, needs_pydanticv1, needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.path_operation_configuration.tutorial005_py39 import app client = TestClient(app) return client @needs_py39 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_separate_openapi_schemas/test_tutorial002_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.tutorial002_py310 import app client = TestClient(app) return client @needs_py310 def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 4.9K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from tests.utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.request_form_models.tutorial002 import app client = TestClient(app) return client @needs_pydanticv2 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006_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.tutorial006_py310 import app c = TestClient(app) return c @needs_py310 def test_foo_needy_very(client: TestClient): response = client.get("/items/foo?needy=very") 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.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 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_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.query_params_str_validations.tutorial010_an_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)