- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for test_read_items (0.07 sec)
-
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial002_tutorial003.py
@pytest.mark.parametrize( "path,expected_response", [ ("/items/42?q=", {"item_id": 42}), ("/items/123?q=somequery", {"item_id": 123, "q": "somequery"}), ], ) def test_read_items(client: TestClient, path, expected_response): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == expected_response
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial004.py
@pytest.mark.parametrize( "path,expected_response", [ ("/items/42?q=", {"item_id": 42}), ("/items/1?q=somequery", {"item_id": 1, "q": "somequery"}), ], ) def test_read_items(client: TestClient, path, expected_response): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == expected_response
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial004.py
"/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "Inactive user"} def test_read_items(mod: ModuleType): client = TestClient(mod.app) access_token = get_access_token(client=client) response = client.get( "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"} )Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 13.3K bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
"name": "Portal Gun", "description": "Device to travel through the multi-rick-verse", "sub": None, }, ] ) def test_read_items(): client = get_app_client() client_no = get_app_client(separate_input_output_schemas=False) response = client.get("/items/") response2 = client_no.get("/items/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 26.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
"/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "Inactive user"} def test_read_items(mod: ModuleType): client = TestClient(mod.app) access_token = get_access_token(scope="me items", client=client) response = client.get(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.8K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py39/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py310/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/app_testing/app_b_py39/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_main_b.py
test_main = test_module test_main.test_create_existing_item() test_main.test_create_item() test_main.test_create_item_bad_token() test_main.test_read_nonexistent_item() test_main.test_read_item()Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 833 bytes - Viewed (0) -
docs_src/app_testing/app_b_py310/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 1.8K bytes - Viewed (0)