- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 227 for p2_test (0.07 sec)
-
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_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_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)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial001 import app client = TestClient(app) return client @needs_pydanticv2 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={ "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py310.py
import pytest from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.response_model.tutorial004_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client() -> TestClient: from docs_src.separate_openapi_schemas.tutorial001 import app client = TestClient(app) return client def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39, needs_pydanticv2 @pytest.fixture(name="client") def get_client() -> TestClient: from docs_src.separate_openapi_schemas.tutorial001_py39 import app client = TestClient(app) return client @needs_py39 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: Thu Sep 28 04:14:40 UTC 2023 - 4.9K bytes - Viewed (0) -
tests/test_fastapi_cli.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 02 06:03:05 UTC 2024 - 790 bytes - Viewed (0) -
tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.additional_status_codes.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_update(client: TestClient): response = client.put("/items/foo", json={"name": "Wrestlers"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 737 bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.5K bytes - Viewed (0) -
tests/test_empty_router.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 22:37:34 UTC 2023 - 805 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.dependencies.tutorial004 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ( "/items", 200, { "items": [ {"item_name": "Foo"}, {"item_name": "Bar"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.4K bytes - Viewed (0)