- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 171 for getClient (0.13 sec)
-
tests/test_tutorial/test_dependencies/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.dependencies.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 @pytest.mark.parametrize( "path,expected_status,expected_response", [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.2K 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_response_model/test_tutorial003_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.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 def test_post_user(client: TestClient): response = client.post( "/user/", json={
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/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.dependencies.tutorial004_an_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,expected_status,expected_response", [ ( "/items",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.6K bytes - Viewed (0) -
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_query_params_str_validations/test_tutorial014_py310.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.query_params_str_validations.tutorial014_py310 import app client = TestClient(app) return client @needs_py310 def test_hidden_query(client: TestClient): response = client.get("/items?hidden_query=somevalue") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial003_py310.py
import pytest from dirty_equals import IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.extra_models.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 def test_get_car(client: TestClient): response = client.get("/items/item1") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial002.py
pytest.param("tutorial002_pv1_an_py39", marks=[needs_py39, needs_pydanticv1]), pytest.param("tutorial002_pv1_an_py310", marks=[needs_py310, needs_pydanticv1]), ], ) 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 - 10.4K 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)