- Sort Score
- Result 10 results
- Languages All
Results 401 - 410 of 1,587 for kjson (0.02 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial008b_an.py
response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text assert response.json() == {"detail": "Owner error: Rick"} def test_get_item(): response = client.get("/items/portal-gun")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 700 bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={ "importance": 2, "item": {"name": "Foo", "price": 50.5}, "user": {"username": "Dave"}, }, ) assert response.status_code == 200 assert response.json() == { "item_id": 5, "importance": 2, "item": { "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.4K bytes - Viewed (0) -
tests/test_get_request_body.py
body = {"name": "Foo", "description": "Some description", "price": 5.5} response = client.request("GET", "/product", json=body) assert response.json() == body 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"}, "paths": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.7K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006_an.py
assert response.headers["WWW-Authenticate"] == "Basic" assert response.json() == {"detail": "Invalid authentication credentials"} 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"}, "paths": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001_an_py39.py
assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_py39 def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_ws_dependencies.py
await websocket.accept() await websocket.send_text(json.dumps(deps)) await websocket.close() @router.websocket("/router", dependencies=[create_dependency("routerindex")]) async def routerindex(websocket: WebSocket, deps: DepList): await websocket.accept() await websocket.send_text(json.dumps(deps)) await websocket.close()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 20:35:39 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_an_py39.py
@needs_py39 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", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/files/": { "post": { "summary": "Create Files",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py
}, ) assert response.status_code == 200, response.text assert response.json() == [{"item": "Foo"}, {"item": "Bar"}] @needs_py39 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", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_an.py
assert response.status_code == 200, response.text assert response.json() == {"filenames": ["test.txt", "test2.txt"]} def test_get_root(): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text assert b"<form" in response.content def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001_py310_pv1.py
response = client.put( "/items/5", json={ "name": "Foo", "description": "A very nice Item", "price": 35.4, "tax": 3.2, }, ) assert response.status_code == 200 @needs_py310 @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 - 4.5K bytes - Viewed (0)