bug fixes and performance improvements
All checks were successful
Build Docker Image / build (push) Successful in 45s

This commit is contained in:
Tudor Sitaru
2025-11-11 11:28:01 +00:00
parent acfb22cbea
commit 4f73b3036e
5 changed files with 82 additions and 84 deletions

View File

@@ -222,7 +222,6 @@ class SnapshotDownloaderTester:
date_from="2024-01-01",
date_to="2024-01-31",
page=1,
per_page=100,
)
except Exception as e:
# Expected - we just want to capture the URL
@@ -339,7 +338,7 @@ class SnapshotDownloaderTester:
print(" ✅ HTML file created")
# Check file content
with open(html_file, 'r', encoding='utf-8') as f:
with open(html_file, "r", encoding="utf-8") as f:
content = f.read()
if "<!DOCTYPE html>" in content:
@@ -514,9 +513,7 @@ class SnapshotDownloaderTester:
# Override the fetch_snapshots_page method to use our mock
original_method = downloader.fetch_snapshots_page
async def mock_fetch_page(
session, type_ids, date_from, date_to, page, per_page
):
async def mock_fetch_page(session, type_ids, date_from, date_to, page):
response_data = mock_session.pages[page - 1]
mock_session.call_count += 1
downloader.stats["pages_fetched"] += 1
@@ -601,6 +598,7 @@ class SnapshotDownloaderTester:
except Exception as e:
print(f"\n❌ TEST SUITE FAILED: {e}")
import traceback
traceback.print_exc()
return False
@@ -660,7 +658,7 @@ def main():
# Setup logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
tester = SnapshotDownloaderTester()