- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for Potter (0.28 sec)
-
tests/test_ws_router.py
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(): client = TestClient(app) with client.websocket_connect("/prefix/") as websocket: data = websocket.receive_text() assert data == "Hello, router with prefix!" def test_native_prefix_router():
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
tests/test_default_response_class_router.py
) router_b_override.include_router(router_b_a, prefix="/a") router_a.include_router(router_a_a, prefix="/a") router_a.include_router( router_a_b_override, prefix="/b", default_response_class=PlainTextResponse ) app.include_router(router_a, prefix="/a") app.include_router( router_b_override, prefix="/b", default_response_class=PlainTextResponse ) client = TestClient(app)
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sun Mar 01 20:49:20 GMT 2020 - 5K bytes - Viewed (0) -
tensorflow/api_template.__init__.py
_compat.enable_v2_behavior() _major_api_version = 2 # Load all plugin libraries from site-packages/tensorflow-plugins if we are # running under pip. # TODO(gunan): Find a better location for this code snippet. from tensorflow.python.framework import load_library as _ll from tensorflow.python.lib.io import file_io as _fi # Get sitepackages directories for the python installation.
Python - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Tue Mar 05 06:27:59 GMT 2024 - 6.7K bytes - Viewed (3) -
tests/test_additional_responses_router.py
message: str app = FastAPI() router = APIRouter() @router.get("/a", responses={501: {"description": "Error 1"}}) async def a(): return "a" @router.get( "/b", responses={ 502: {"description": "Error 2"}, "4XX": {"description": "Error with range, upper"}, }, ) async def b(): return "b" @router.get( "/c", responses={
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.1K bytes - Viewed (0) -
tests/test_router_redirect_slashes.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient def test_redirect_slashes_enabled(): app = FastAPI() router = APIRouter() @router.get("/hello/") def hello_page() -> str: return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 10:37:50 GMT 2023 - 974 bytes - Viewed (0) -
tests/test_include_router_defaults_overrides.py
callbacks=callback_router3.routes, ) router2_override.include_router(router4_override) router2_override.include_router(router4_default) router2_default.include_router( router4_override, prefix="/level3", tags=["level3a", "level3b"], dependencies=[Depends(dep3)], responses={ 403: {"description": "Client error level 3"}, 503: {"description": "Server error level 3"},
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 358.6K bytes - Viewed (0) -
tests/test_router_prefix_with_template.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("/users/{id}") def read_user(segment: str, id: str): return {"segment": segment, "id": id} app.include_router(router, prefix="/{segment}") client = TestClient(app) def test_get(): response = client.get("/seg/users/foo")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 484 bytes - Viewed (0) -
fastapi/param_functions.py
Doc( """ OpenAPI-specific examples. It will be added to the generated OpenAPI (e.g. visible at `/docs`). Swagger UI (that provides the `/docs` interface) has better support for the OpenAPI-specific examples than the JSON Schema `examples`, that's the main use case for this. Read more about it in the
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
ci/official/utilities/extract_resultstore_links.py
k -= 1 continue previous_end_line = lines.get('end') or start_line return result_store_links def indent_xml(elem, level=0) -> None: """Indents and newlines the XML for better output.""" indent_str = '\n' + level * ' ' if len(elem): # pylint: disable=g-explicit-length-test # `if elem` not valid if not elem.text or not elem.text.strip(): elem.text = indent_str + ' '
Python - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Wed Nov 08 17:50:27 GMT 2023 - 10.9K bytes - Viewed (0) -
tests/test_empty_router.py
import pytest from fastapi import APIRouter, FastAPI from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient app = FastAPI() router = APIRouter() @router.get("") def get_empty(): return ["OK"] app.include_router(router, prefix="/prefix") client = TestClient(app) def test_use_empty(): with client: response = client.get("/prefix")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sun Jun 11 22:37:34 GMT 2023 - 805 bytes - Viewed (0)