- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 51 for remain (0.18 sec)
-
docs/extensions/s3zip/examples/boto3/main.py
Harshavardhana <******@****.***> 1628111741 -0700
Python - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Aug 04 21:15:45 GMT 2021 - 771 bytes - Viewed (0) -
docs_src/app_testing/app_b/test_main.py
from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 1.8K bytes - Viewed (0) -
docs_src/async_tests/test_main.py
import pytest from httpx import AsyncClient from .main import app @pytest.mark.anyio async def test_root(): async with AsyncClient(app=app, base_url="http://test") as ac: response = await ac.get("/") assert response.status_code == 200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Oct 06 15:32:11 GMT 2021 - 306 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/main.py
@app.post("/users/", response_model=schemas.User) def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)): db_user = crud.get_user_by_email(db, email=user.email) if db_user: raise HTTPException(status_code=400, detail="Email already registered") return crud.create_user(db=db, user=user) @app.get("/users/", response_model=list[schemas.User])
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.6K bytes - Viewed (0) -
docs_src/settings/app03_an/main.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 451 bytes - Viewed (0) -
tests/test_modules_same_name_body/app/main.py
Sebastián RamÃrez <******@****.***> 1561743316 +0200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 28 17:35:16 GMT 2019 - 150 bytes - Viewed (0) -
docs_src/app_testing/app_b_an/main.py
} app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.2K bytes - Viewed (0) -
docs_src/app_testing/app_b_py310/main.py
} app = FastAPI() class Item(BaseModel): id: str title: str description: str | None = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: str = Header()): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:44:08 GMT 2024 - 1.1K bytes - Viewed (0) -
tests/main.py
arjwilliams <******@****.***> 1713477419 +0100
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 4.3K bytes - Viewed (0) -
tests/test_modules_same_name_body/test_main.py
from fastapi.testclient import TestClient from .app.main import app client = TestClient(app) def test_post_a(): data = {"a": 2, "b": "foo"} response = client.post("/a/compute", json=data) assert response.status_code == 200, response.text data = response.json() def test_post_a_invalid(): data = {"a": "bar", "b": "foo"} response = client.post("/a/compute", json=data)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.6K bytes - Viewed (0)