- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,098 for assertIs (0.05 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial008c_an.py
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"} def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_fastapi_error(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py
response = client.get("/items/") assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} def test_query_params_str_validations_item_query_fixedquery(client: TestClient): response = client.get("/items/", params={"item-query": "fixedquery"}) assert response.status_code == 200 assert response.json() == {
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_query_params_str_validations/test_tutorial010_an_py310.py
response = client.get("/items/") assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} @needs_py310 def test_query_params_str_validations_item_query_fixedquery(client: TestClient): response = client.get("/items/", params={"item-query": "fixedquery"}) assert response.status_code == 200 assert response.json() == {
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_tutorial/test_dependencies/test_tutorial008d.py
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"} def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_internal_error(client: TestClient):
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_path_operation_advanced_configurations/test_tutorial007_pv1.py
response = client.post("/items/", content=yaml_data) assert response.status_code == 422, response.text assert response.json() == { "detail": [ {"loc": ["tags", 3], "msg": "str type expected", "type": "type_error.str"} ] } @needs_pydanticv1 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_dependency_normal_exceptions.py
def test_dependency_gets_exception(): assert state["except"] is False assert state["finally"] is False response = client.put("/invalid-user/rick", json="Morty") assert response.status_code == 400, response.text assert response.json() == {"detail": "Invalid user"} assert state["except"] is True assert state["finally"] is True assert fake_database["rick"] == "Rick Sanchez"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_param_models/test_tutorial001.py
response = c.get("/items/") assert response.status_code == 200 assert response.json() == snapshot( {"session_id": "123", "fatebook_tracker": None, "googall_tracker": None} ) def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == snapshot( {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_02_py310.py
response = client.post("/files/") assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} @needs_py310 def test_post_uploadfile_no_body(client: TestClient): response = client.post("/uploadfile/") assert response.status_code == 200, response.text assert response.json() == {"message": "No upload file sent"} @needs_py310
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
) assert response.status_code == 200, response.text assert response.json() == { "file_size": 14, "token": "foo", "fileb_content_type": "text/plain", } def test_openapi_schema(client: TestClient): 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: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py
) assert response.status_code == 200, response.text assert response.json() == { "file_size": 14, "token": "foo", "fileb_content_type": "text/plain", } @needs_py39 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.9K bytes - Viewed (0)