- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 172 for get_client (0.12 sec)
-
tests/test_regex_deprecated_params.py
return client @needs_py310 def test_query_params_str_validations_no_query(): client = get_client() response = client.get("/items/") assert response.status_code == 200 assert response.json() == "Hello World" @needs_py310 def test_query_params_str_validations_q_fixedquery(): client = get_client() response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_conditional_openapi/test_tutorial001.py
client = get_client() response = client.get("/openapi.json") assert response.status_code == 404, response.text response = client.get("/docs") assert response.status_code == 404, response.text response = client.get("/redoc") assert response.status_code == 404, response.text @needs_pydanticv2 def test_root(): client = get_client() response = client.get("/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.8K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
client = TestClient(app) return client @needs_py310 def test_no_query(): client = get_client() response = client.post("/items/") assert response.status_code == 200 assert response.json() == "Hello World" @needs_py310 def test_q_fixedquery(): client = get_client() response = client.post("/items/", data={"q": "fixedquery"}) 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_additional_status_codes/test_tutorial001_py310.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.additional_status_codes.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 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 - 738 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003_py39.py
return app @pytest.fixture(name="html") def get_html(): from docs_src.websockets.tutorial003_py39 import html return html @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client @needs_py39 def test_get(client: TestClient, html: str): response = client.get("/") assert response.text == html
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an.py
import pytest from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008d_an 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_extra_models/test_tutorial004_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.extra_models.tutorial004_py39 import app client = TestClient(app) return client @needs_py39 def test_get_items(client: TestClient): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/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.security.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_no_token(client: TestClient): response = client.get("/items") assert response.status_code == 401, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K 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) -
tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py310.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.additional_status_codes.tutorial001_an_py310 import app client = TestClient(app) return client @needs_py310 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 - 741 bytes - Viewed (0)