- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 65 for test_put (0.04 sec)
-
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial006_py39 import app client = TestClient(app) def test_post(): response = client.post("/items/", content=b"this is actually not validated") assert response.status_code == 200, response.text assert response.json() == { "size": 30, "content": { "name": "Maaaagic", "price": 42,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009b.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial009b_py39 from docs_src.custom_response.tutorial009b_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial009b_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 505 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial003_py39 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 580 bytes - Viewed (0) -
tests/test_schema_compat_pydantic_v2.py
@app.get("/users") async def get_user() -> User: return {"username": "alice", "role": "admin"} client = TestClient(app) return client @needs_py310 def test_get(client: TestClient): response = client.get("/users") assert response.json() == {"username": "alice", "role": "admin"} @needs_py310 def test_openapi_schema(client: TestClient):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003.py
@pytest.fixture(name="html") def get_html(mod: ModuleType): return mod.html @pytest.fixture(name="client") def get_client(mod: ModuleType): client = TestClient(mod.app) return client def test_get(client: TestClient, html: str): response = client.get("/") assert response.text == html def test_websocket_handle_disconnection(client: TestClient): with (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_sub_applications/test_tutorial001.py
def test_openapi_schema_sub(): response = client.get("/subapi/openapi.json") assert response.status_code == 200, response.text assert response.json() == openapi_schema_sub def test_sub(): response = client.get("/subapi/sub") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java
@J2ktIncompatible @GwtIncompatible // NullPointerTester @Override public void testNullPointerInstance() {} // put() and putAll() aren't supported. @Override public void testPut() { assertThrows(UnsupportedOperationException.class, () -> table.put("foo", 1, 'a')); assertSize(0); } @Override public void testPutAllTable() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 3.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d.py
client = TestClient(mod.app) response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} def test_get(mod: ModuleType): client = TestClient(mod.app) response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial004.py
def test_get_http_error(): response = client.get("/items/3") assert response.status_code == 418, response.text assert response.content == b"Nope! I don't like 3." def test_get(): response = client.get("/items/2") assert response.status_code == 200, response.text assert response.json() == {"item_id": 2} def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
client = TestClient(mod.app) response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} def test_get(mod: ModuleType): client = TestClient(mod.app) response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0)