- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 63 for test_put (0.03 sec)
-
tests/test_tutorial/test_body_updates/test_tutorial001.py
client = TestClient(mod.app) return client def test_get(client: TestClient): response = client.get("/items/baz") assert response.status_code == 200, response.text assert response.json() == { "name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": [], } def test_put(client: TestClient): response = client.put(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.6K bytes - Viewed (0) -
tests/test_tutorial/test_encoder/test_tutorial001.py
return module @pytest.fixture(name="client") def get_client(mod: ModuleType): client = TestClient(mod.app) return client def test_put(client: TestClient, mod: ModuleType): fake_db = mod.fake_db response = client.put( "/items/123", json={ "title": "Foo", "timestamp": "2023-01-01T12:00:00",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.7K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
response = client.put("/items/foo", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_put(client: TestClient): response = client.put( "/items/plumbus?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 21.3K bytes - Viewed (0) -
tests/test_path.py
Sebastián RamÃrez <******@****.***> 1766859550 -0800
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 20.5K bytes - Viewed (1) -
tests/test_jsonable_encoder.py
class ModelWithPath(BaseModel): path: PurePath model_config = {"arbitrary_types_allowed": True} test_path = PurePath("/foo", "bar") obj = ModelWithPath(path=test_path) assert jsonable_encoder(obj) == {"path": str(test_path)} def test_encode_model_with_pure_posix_path(): class ModelWithPath(BaseModel): path: PurePosixPath
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java
private Smb2TreeConnectRequest request; private static final String TEST_PATH = "\\\\server\\share"; @BeforeEach void setUp() { mockConfig = mock(Configuration.class); mockContext = mock(CIFSContext.class); when(mockContext.getConfig()).thenReturn(mockConfig); request = new Smb2TreeConnectRequest(mockConfig, TEST_PATH); } @TestRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial009_py39 from docs_src.custom_response.tutorial009_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial009_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 - 502 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009c.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial009c_py39 import app client = TestClient(app) def test_get(): response = client.get("/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 244 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial002_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 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial007.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial007_py39 import app client = TestClient(app) def test_get(): fake_content = b"some fake video bytes" response = client.get("/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 269 bytes - Viewed (0)