- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for html (0.18 sec)
-
docs_src/websockets/tutorial002_py310.py
from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an.py
from docs_src.websockets.tutorial002_an import app def test_main(): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text assert b"<!DOCTYPE html>" in response.content def test_websocket_with_cookie(): client = TestClient(app, cookies={"session": "fakesession"}) with pytest.raises(WebSocketDisconnect):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 3.6K bytes - Viewed (0) -
tests/test_local_docs.py
def test_strings_in_generated_swagger(): sig = inspect.signature(get_swagger_ui_html) swagger_js_url = sig.parameters.get("swagger_js_url").default # type: ignore swagger_css_url = sig.parameters.get("swagger_css_url").default # type: ignore swagger_favicon_url = sig.parameters.get("swagger_favicon_url").default # type: ignore
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Dec 20 18:50:00 GMT 2020 - 2.4K bytes - Viewed (0) -
fastapi/openapi/docs.py
})""" if init_oauth: html += f""" ui.initOAuth({json.dumps(jsonable_encoder(init_oauth))}) """ html += """ </script> </body> </html> """ return HTMLResponse(html) def get_redoc_html( *, openapi_url: Annotated[ str, Doc( """ The OpenAPI URL that ReDoc should load and use.
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 10.1K bytes - Viewed (0) -
docs_src/custom_response/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 394 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial004 import app client = TestClient(app) html_contents = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ def test_get_custom_response(): response = client.get("/items/")
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/custom_response/tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 352 bytes - Viewed (0) -
docs_src/websockets/tutorial003_py39.py
from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <h2>Your ID: <span id="ws-id"></span></h2> <form action="" onsubmit="sendMessage(event)"> <input type="text" id="messageText" autocomplete="off"/>
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py
yield client static_dir.rmdir() def test_swagger_ui_html(client: TestClient): response = client.get("/docs") assert response.status_code == 200, response.text assert "/static/swagger-ui-bundle.js" in response.text assert "/static/swagger-ui.css" in response.text def test_swagger_ui_oauth2_redirect_html(client: TestClient): response = client.get("/docs/oauth2-redirect")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
static_dir.rmdir() def test_swagger_ui_html(client: TestClient): response = client.get("/docs") assert response.status_code == 200, response.text assert ( "https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-bundle.js" in response.text ) assert "https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" in response.text def test_swagger_ui_oauth2_redirect_html(client: TestClient):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.3K bytes - Viewed (0)