- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for Wiles (0.16 sec)
-
tests/test_tutorial/test_request_files/test_tutorial001_03.py
from fastapi.testclient import TestClient from docs_src.request_files.tutorial001_03 import app client = TestClient(app) def test_post_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0) -
ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py
# ============================================================================== """Merge all JUnit test.xml files in one directory into one. Usage: squash_testlogs.py START_DIRECTORY OUTPUT_FILE Example: squash_testlogs.py /tf/pkg/testlogs /tf/pkg/merged.xml Recursively find all the JUnit test.xml files in one directory, and merge any of them that contain failures into one file. The TensorFlow DevInfra team
Python - Registered: Tue May 07 12:40:20 GMT 2024 - Last Modified: Mon Sep 18 19:00:37 GMT 2023 - 4.8K bytes - Viewed (0) -
tests/test_compat.py
assert response2.json() == [1, 2] def test_is_bytes_sequence_annotation_union(): # For coverage # TODO: in theory this would allow declaring types that could be lists of bytes # to be read from files and other types, but I'm not even sure it's a good idea # to support it as a first class "feature" assert is_bytes_sequence_annotation(Union[List[str], List[bytes]]) def test_is_uploadfile_sequence_annotation():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 2.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003.py
"components": { "schemas": { "Body_create_files_files__post": { "title": "Body_create_files_files__post", "required": ["files"], "type": "object", "properties": { "files": { "title": "Files", "type": "array",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_py39.py
"components": { "schemas": { "Body_create_files_files__post": { "title": "Body_create_files_files__post", "required": ["files"], "type": "object", "properties": { "files": { "title": "Files", "type": "array",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py
@pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001_an import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client def test_post_form_no_body(client: TestClient): response = client.post("/files/") assert response.status_code == 422, response.text assert response.json() == IsDict(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_02_an.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.request_files.tutorial001_02_an import app client = TestClient(app) def test_post_form_no_body(): response = client.post("/files/") assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} def test_post_uploadfile_no_body(): response = client.post("/uploadfile/")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 8.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_03_an.py
from fastapi.testclient import TestClient from docs_src.request_files.tutorial001_03_an import app client = TestClient(app) def test_post_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial004.py
client = TestClient(app) def test_file_path(): response = client.get("/files/home/johndoe/myfile.txt") print(response.content) assert response.status_code == 200, response.text assert response.json() == {"file_path": "home/johndoe/myfile.txt"} def test_root_file_path(): response = client.get("/files//home/johndoe/myfile.txt") print(response.content)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0)