- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,100 for Upsert (0.04 sec)
-
tests/test_security_api_key_query.py
response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "APIKey"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_forms_single_model.py
"username": "Rick", "lastname": "Sanchez", "age": "70", "tags": ["plumbus", "citadel"], "with": "something", }, ) assert response.status_code == 200, response.text assert response.json() == { "username": "Rick", "lastname": "Sanchez", "age": 70, "tags": ["plumbus", "citadel"], "with": "something", }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
json={"item": {"data": "myitem"}, "item2": {"data": "myitem2"}}, ) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem2"}] def test_duplicates(): response = client.post("/with-duplicates", json={"data": "myitem"}) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem"}]Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.4K bytes - Viewed (0) -
tests/test_request_params/test_body/test_optional_str.py
client = TestClient(app) response = client.post("/optional-str") assert response.status_code == 200, response.text assert response.json() == {"p": None} def test_model_optional_str_missing(): client = TestClient(app) response = client.post("/model-optional-str") assert response.status_code == 422, response.text assert response.json() == { "detail": [ {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11.6K bytes - Viewed (0) -
tests/test_response_model_default_factory.py
assert response.status_code == 200, response.text assert response.json()["code"] == 200 assert response.json()["message"] == "Successful operation." def test_response_model_has_default_factory_return_model(): response = client.get("/response_model_has_default_factory_return_model") assert response.status_code == 200, response.textRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 18:51:40 UTC 2025 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_response_directly/test_tutorial002.py
""" response = client.get("/legacy/") assert response.status_code == 200, response.text assert response.headers["content-type"] == "application/xml" assert response.text == expected_content def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "info": {Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text assert response.json() == {"message": "Item not found"} def test_openapi_schema():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial005.py
def test_post(): data = {"title": "towel", "size": 5} response = client.post("/items/", json=data) assert response.status_code == 200, response.text assert response.json() == data 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py
response = client.get(path) assert response.status_code == 200, response.text assert response.json() == expected_response def test_read_items_item_id_less_than_zero(client: TestClient): response = client.get("/items/-1?q=somequery&size=5") assert response.status_code == 422, response.text assert response.json() == { "detail": [ {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.3K bytes - Viewed (0)