- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for load3 (0.16 sec)
-
tests/test_ws_dependencies.py
def test_index(): client = TestClient(app) with client.websocket_connect("/") as websocket: data = json.loads(websocket.receive_text()) assert data == ["app", "index"] def test_routerindex(): client = TestClient(app) with client.websocket_connect("/router") as websocket: data = json.loads(websocket.receive_text()) assert data == ["app", "router2", "router", "routerindex"]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 20:35:39 GMT 2023 - 2.1K bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007.py
"required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try: item = Item.model_validate(data) except ValidationError as e:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 822 bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001_py310.py
"type": "type_error.dict", } ] } ) @needs_py310 def test_other_exceptions(client: TestClient): with patch("json.loads", side_effect=Exception): response = client.post("/items/", json={"test": "test2"}) assert response.status_code == 400, response.text @needs_py310 def test_openapi_schema(client: TestClient):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15K bytes - Viewed (2) -
tests/test_tutorial/test_body/test_tutorial001.py
"type": "type_error.dict", } ] } ) def test_other_exceptions(client: TestClient): with patch("json.loads", side_effect=Exception): response = client.post("/items/", json={"test": "test2"}) assert response.status_code == 400, response.text def test_openapi_schema(client: TestClient):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (7) -
docs_src/path_operation_advanced_configuration/tutorial007_pv1.py
"required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try: item = Item.parse_obj(data) except ValidationError as e:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 789 bytes - Viewed (0) -
tests/test_tutorial/test_conditional_openapi/test_tutorial001.py
importlib.reload(tutorial001) client = TestClient(tutorial001.app) return client @needs_pydanticv2 def test_disable_openapi(monkeypatch): monkeypatch.setenv("OPENAPI_URL", "") # Load the client after setting the env var client = get_client() response = client.get("/openapi.json") assert response.status_code == 404, response.text response = client.get("/docs")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.8K bytes - Viewed (0) -
scripts/docs.py
@lru_cache def is_mkdocs_insiders() -> bool: version = metadata.version("mkdocs-material") return "insiders" in version def get_en_config() -> Dict[str, Any]: return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) def get_lang_paths() -> List[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: Optional[str]) -> Union[str, None]: if lang is None:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
fastapi/openapi/docs.py
Doc( """ Load and use Google Fonts. """ ), ] = True, ) -> HTMLResponse: """ Generate and return the HTML response that loads ReDoc for the alternative API docs (normally served at `/redoc`). You would only call this function yourself if you needed to override some parts, for example the URLs to use to load ReDoc's JavaScript and CSS.
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 10.1K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
response = client.get("/context_b_bg") data = response.json() assert data["context_b"] == "started b" assert data["context_a"] == "started a" assert data["bg"] == "not set" middleware_state = json.loads(response.headers["x-state"]) assert middleware_state["context_b"] == "finished b with a: started a" assert middleware_state["context_a"] == "finished a" assert middleware_state["bg"] == "not set"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 11.6K bytes - Viewed (0)