- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 806 for fixture (0.06 sec)
-
tests/test_tutorial/test_body_updates/test_tutorial001_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.body_updates.tutorial001_py39 import app client = TestClient(app) return client @needs_py39 def test_get(client: TestClient): response = client.get("/items/baz") 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 - 11.8K bytes - Viewed (0) -
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"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py39.py
import pytest from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py39 @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}), (
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_request_files/test_tutorial001_02_an_py39.py
from pathlib import Path 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.request_files.tutorial001_02_an_py39 import app client = TestClient(app) return client @needs_py39 def test_post_form_no_body(client: TestClient): response = client.post("/files/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001_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.extra_data_types.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_extra_types(client: TestClient): item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e" data = {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 7K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005_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.tutorial005_py310 import app client = TestClient(app) return client @needs_py310 def test_read_item_name(client: TestClient): response = client.get("/items/bar/name")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial005_an import app client = TestClient(app) return client 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: Sat Aug 26 18:03:13 UTC 2023 - 6.7K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005_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.schema_extra_example.tutorial005_py310 import app client = TestClient(app) return client @needs_py310 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 26 18:03:13 UTC 2023 - 6.8K bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial002.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310, needs_pydanticv1, needs_pydanticv2 @pytest.fixture( name="client", params=[ pytest.param("tutorial002", marks=needs_pydanticv2), pytest.param("tutorial002_py39", marks=[needs_py39, needs_pydanticv2]),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 10.4K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_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.schema_extra_example.tutorial004_an_py310 import app client = TestClient(app) return client # Test required and embedded body parameters with no bodies sent @needs_py310 def test_post_body_example(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0)