- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 20 for test_read_items (0.08 seconds)
-
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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 5.6K bytes - Click Count (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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 6K bytes - Click Count (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}"} )Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 13.3K bytes - Click Count (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/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 26.6K bytes - Click Count (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(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 15.8K bytes - Click Count (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():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 15 22:31:16 GMT 2024 - 1.8K bytes - Click Count (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():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 15 22:31:16 GMT 2024 - 1.8K bytes - Click Count (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():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.8K bytes - Click Count (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()Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 833 bytes - Click Count (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():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 1.8K bytes - Click Count (0)