Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Fix a Windows clock-resolution flake in test_file_path_from_response (#8032)

Adrian643243e878a7
diff --git a/tests/test_pipeline_files.py b/tests/test_pipeline_files.py
index 928f4e2c2..d493d2b46 100644
--- a/tests/test_pipeline_files.py
+++ b/tests/test_pipeline_files.py
@@ -430,7 +430,7 @@ class TestFilesPipeline:
mock.patch.object(
FSFilesStore,
"stat_file",
- return_value={"checksum": "abc", "last_modified": time.time()},
+ return_value={"checksum": "abc", "last_modified": time.time() - 1},
),
mock.patch.object(
FilesPipeline, "get_media_requests", return_value=[request]