Skip to content

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

Fix TestGCSFilesStore in non-UTC. (#8351)

Andrey Rakhmatullinbf89e759d394
diff --git a/tests/test_pipeline_files.py b/tests/test_pipeline_files.py
index b943e6e9e..422d95f39 100644
--- a/tests/test_pipeline_files.py
+++ b/tests/test_pipeline_files.py
@@ -1473,7 +1473,7 @@ class TestGCSFilesStore:
stat = await maybe_deferred_to_future(
store.stat_file("full/filename", info=DUMMY_SPIDER_INFO)
)
- assert stat == {"last_modified": time.mktime(updated.timetuple())}
+ assert stat == {"last_modified": updated.timestamp()}
@coroutine_test
async def test_stat_missing_blob(self) -> None: