- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for test_read_items (0.19 sec)
-
tests/test_tutorial/test_response_model/test_tutorial001_tutorial001_01.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client def test_read_items(client: TestClient): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.5K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py
{"item_id": 0, "size": 0.1}, ), ( "/items/1000?q=somequery&size=10.4", {"item_id": 1000, "q": "somequery", "size": 10.4}, ), ], ) def test_read_items(client: TestClient, path, expected_response): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == expected_responseRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial005.py
@pytest.mark.parametrize( "path,expected_response", [ ("/items/1?q=", {"item_id": 1}), ("/items/1000?q=somequery", {"item_id": 1000, "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 - 6.6K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py
@pytest.mark.parametrize( "path,expected_response", [ ("/items/42", {"item_id": 42}), ("/items/123?item-query=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_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_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)