- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 108 for parameterized (0.1 sec)
-
tests/test_tutorial/test_cookie_params/test_tutorial001_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.cookie_params.tutorial001_an import app @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial002_an import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"strange_header": None}), ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}), ( "/items",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @needs_py310 @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"},
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_header_params/test_tutorial001_py310.py
@pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @needs_py310 @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"},
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_header_params/test_tutorial002_an_py310.py
@pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial002_an_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"strange_header": None}), ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial001_an import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.8K bytes - Viewed (0) -
tests/test_computed_fields.py
@app.get("/responses", responses={200: {"model": Rectangle}}) def read_responses() -> Rectangle: return Rectangle(width=3, length=4) client = TestClient(app) return client @pytest.mark.parametrize("path", ["/", "/responses"]) @needs_pydanticv2 def test_get(client: TestClient, path: str): response = client.get(path) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_py310.py
@pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"X-Token values": None}), ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py39.py
@pytest.fixture(name="client") def get_client(): from docs_src.response_model.tutorial004_py39 import app client = TestClient(app) return client @needs_py39 @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), ( "/items/bar", {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.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)