- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,022 for App (0.41 sec)
-
tests/test_validate_response_recursive/app_pv1.py
name: str RecursiveSubitemInSubmodel.update_forward_refs() @app.get("/items/recursive", response_model=RecursiveItem) def get_recursive(): return {"name": "item", "sub_items": [{"name": "subitem", "sub_items": []}]} @app.get("/items/recursive-submodel", response_model=RecursiveItemViaSubmodel) def get_recursive_submodel(): return { "name": "item", "sub_items1": [
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.1K bytes - Viewed (0) -
tests/test_validate_response_recursive/app_pv2.py
name: str RecursiveSubitemInSubmodel.model_rebuild() RecursiveItemViaSubmodel.model_rebuild() @app.get("/items/recursive", response_model=RecursiveItem) def get_recursive(): return {"name": "item", "sub_items": [{"name": "subitem", "sub_items": []}]} @app.get("/items/recursive-submodel", response_model=RecursiveItemViaSubmodel) def get_recursive_submodel(): return { "name": "item",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/app_pv1.py
from typing import Optional from fastapi import Depends, FastAPI from pydantic import BaseModel, validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None model_b: ModelB @validator("name") def lower_username(cls, name: str, values):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 784 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py
def override_get_db(): try: db = TestingSessionLocal() yield db finally: db.close() app.dependency_overrides[get_db] = override_get_db client = TestClient(app) def test_create_user(): response = client.post( "/users/", json={"email": "******@****.***", "password": "chimichangas4life"}, ) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py
def override_get_db(): try: db = TestingSessionLocal() yield db finally: db.close() app.dependency_overrides[get_db] = override_get_db client = TestClient(app) def test_create_user(): response = client.post( "/users/", json={"email": "******@****.***", "password": "chimichangas4life"}, ) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/tests/test_sql_app.py
Base.metadata.create_all(bind=engine) def override_get_db(): try: db = TestingSessionLocal() yield db finally: db.close() app.dependency_overrides[get_db] = override_get_db client = TestClient(app) def test_create_user(): response = client.post( "/users/", json={"email": "******@****.***", "password": "chimichangas4life"}, )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jun 22 11:20:12 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
from fastapi.websockets import WebSocketDisconnect from ...utils import needs_py310 @pytest.fixture(name="app") def get_app(): from docs_src.websockets.tutorial002_an_py310 import app return app @needs_py310 def test_main(app: FastAPI): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 3.9K bytes - Viewed (0) -
tests/test_invalid_path_param.py
app = FastAPI() @app.get("/items/{id}") def read_items(id: list): pass # pragma: no cover def test_invalid_simple_tuple(): with pytest.raises(AssertionError): app = FastAPI() @app.get("/items/{id}") def read_items(id: tuple): pass # pragma: no cover def test_invalid_simple_set(): with pytest.raises(AssertionError):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Jun 03 17:59:40 GMT 2019 - 1.7K 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/sub_applications/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jun 11 21:53:19 GMT 2020 - 274 bytes - Viewed (0)