- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for test_router (0.06 sec)
-
tests/test_ws_router.py
def test_app(): client = TestClient(app) with client.websocket_connect("/") as websocket: data = websocket.receive_text() assert data == "Hello, world!" def test_router(): client = TestClient(app) with client.websocket_connect("/router") as websocket: data = websocket.receive_text() assert data == "Hello, router!" def test_prefix_router():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 7.5K bytes - Viewed (0) -
tests/test_default_response_class.py
def test_app_override(): with client: response = client.get("/override") assert response.content == b"Hello World" assert response.headers["content-type"] == text_type def test_router_a(): with client: response = client.get("/a") assert response.json() == {"msg": "Hello A"} assert response.headers["content-type"] == orjson_type def test_router_a_override():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5.2K bytes - Viewed (0) -
tests/test_default_response_class_router.py
def test_app_override(): with client: response = client.get("/override") assert response.content == b"Hello World" assert response.headers["content-type"] == text_type def test_router_a(): with client: response = client.get("/a") assert response.json() == {"msg": "Hello A"} assert response.headers["content-type"] == json_type def test_router_a_override():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Mar 01 20:49:20 UTC 2020 - 5K bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
def post_root(item1: Item, item2: Item): return item1, item2 # pragma: nocover @router.post( "/router", response_model=List[Item], responses={404: {"model": List[Message]}} ) def post_router(item1: Item, item2: Item): return item1, item2 # pragma: nocover app.include_router(router) client = TestClient(app) response = client.get("/openapi.json") data = response.json()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 13 15:10:26 UTC 2024 - 66.7K bytes - Viewed (0)