- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for read_main (0.35 sec)
-
tests/test_tutorial/test_testing/test_tutorial001.py
from docs_src.app_testing.tutorial001 import client, test_read_main def test_main(): test_read_main() 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": { "/": { "get": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 821 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_main.py
from docs_src.app_testing.test_main import client, test_read_main def test_main(): test_read_main() 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": { "/": { "get": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 819 bytes - Viewed (0) -
docs_src/app_testing/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 334 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 10 09:08:19 GMT 2020 - 154 bytes - Viewed (0) -
docs_src/app_testing/tutorial002.py
from fastapi.websockets import WebSocket app = FastAPI() @app.get("/") async def read_main(): return {"msg": "Hello World"} @app.websocket("/ws") async def websocket(websocket: WebSocket): await websocket.accept() await websocket.send_json({"msg": "Hello WebSocket"}) await websocket.close() def test_read_main(): client = TestClient(app) response = client.get("/")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Feb 08 10:23:07 GMT 2023 - 757 bytes - Viewed (0) -
tests/test_deprecated_openapi_prefix.py
from fastapi import FastAPI, Request from fastapi.testclient import TestClient app = FastAPI(openapi_prefix="/api/v1") @app.get("/app") def read_main(request: Request): return {"message": "Hello World", "root_path": request.scope.get("root_path")} client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.2K bytes - Viewed (0) -
docs_src/app_testing/main.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 118 bytes - Viewed (0) -
docs_src/app_testing/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_main(): response = client.get("/") assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 238 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jun 11 21:53:19 GMT 2020 - 208 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jun 11 21:53:19 GMT 2020 - 189 bytes - Viewed (0)