- Sort Score
- Result 10 results
- Languages All
Results 371 - 380 of 1,109 for assertIs (0.11 sec)
-
tests/test_filter_pydantic_sub_model_pv2.py
client = TestClient(app) return client @needs_pydanticv2 def test_filter_sub_model(client: TestClient): response = client.get("/model/modelA") assert response.status_code == 200, response.text assert response.json() == { "name": "modelA", "description": "model-a-desc", "foo": {"username": "test-user"}, } @needs_pydanticv2
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
tests/test_response_code_no_body.py
def test_get_response(): response = client.get("/a") assert response.status_code == 204, response.text assert "content-length" not in response.headers assert response.content == b"" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_skip_defaults.py
def test_return_defaults(): response = client.get("/") assert response.json() == {"sub": {}} def test_return_exclude_unset(): response = client.get("/exclude_unset") assert response.json() == {"x": None, "y": "y"} def test_return_exclude_defaults(): response = client.get("/exclude_defaults") assert response.json() == {} def test_return_exclude_none():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial002.py
assert response.status_code == 200 assert response.json() == { "host": "testserver", "save_data": True, "if_modified_since": None, "traceparent": None, "x_tag": [], } def test_header_param_model_invalid(client: TestClient): response = client.get("/items/") assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial001.py
}, ) assert response.status_code == 200 assert response.json() == { "limit": 10, "offset": 5, "order_by": "updated_at", "tags": ["tag1", "tag2"], } def test_query_param_model_defaults(client: TestClient): response = client.get("/items/") assert response.status_code == 200 assert response.json() == { "limit": 100,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.2K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005_py310.py
response = client.get("/items/bar/name") assert response.status_code == 200, response.text assert response.json() == {"name": "Bar", "description": "The Bar fighters"} @needs_py310 def test_read_item_public_data(client: TestClient): response = client.get("/items/bar/public") assert response.status_code == 200, response.text assert response.json() == { "name": "Bar",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004.py
], ) def test_get(path, expected_status, expected_response): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004_an.py
], ) def test_get(path, expected_status, expected_response): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.4K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0) -
tests/test_validate_response_recursive/test_validate_response_recursive_pv2.py
client = TestClient(app) response = client.get("/items/recursive") assert response.status_code == 200, response.text assert response.json() == { "sub_items": [{"name": "subitem", "sub_items": []}], "name": "item", } response = client.get("/items/recursive-submodel") assert response.status_code == 200, response.text assert response.json() == { "name": "item", "sub_items1": [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 900 bytes - Viewed (0)