Skip to content

Commit

Permalink
fix(scraper): Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatelot committed Aug 30, 2024
1 parent 16c9209 commit bf63f52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/ecoindex/scraper/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def bulk_analysis(
wait_after_scroll: int = 0,
wait_before_scroll: int = 0,
logger=None,
) -> Generator[tuple[Result, bool], None]:
) -> Generator[tuple[Result, bool], None, None]:
with ThreadPoolExecutor(max_workers=max_workers) as executor:
future_to_analysis = {}

Expand Down
8 changes: 4 additions & 4 deletions test/components/ecoindex/scraper/test_scraper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json

from ecoindex.exceptions.scraper import EcoindexScraperStatusException
from ecoindex.models import ScreenShot, WindowSize
from ecoindex.scraper import EcoindexScraper
Expand Down Expand Up @@ -174,8 +175,7 @@ async def test_check_page_response():
assert str(e) == {
"mimetype": "audio/mpeg",
"message": (
"This resource is not "
"a standard page with mimeType 'text/html'"
"This resource is not " "a standard page with mimeType 'text/html'"
),
}

Expand All @@ -187,5 +187,5 @@ async def test_check_page_response():
"status": 404,
"message": mock_stripped_har_entry[1]["response"]["status_text"],
}
assert scraper.check_page_response(mock_stripped_har_entry[2]) is None

assert scraper.check_page_response(mock_stripped_har_entry[2]) is None

0 comments on commit bf63f52

Please sign in to comment.