fix(test): fix the scrapers

This commit is contained in:
Barrett Ruth 2025-09-19 20:31:39 -04:00
parent aedbccffb4
commit 1b77763648
3 changed files with 13 additions and 11 deletions

View file

@ -1,6 +1,6 @@
from unittest.mock import Mock
from scrapers.codeforces import scrape, scrape_contest_problems
from scrapers.models import Problem
from scrapers.models import ProblemSummary
def test_scrape_success(mocker, mock_codeforces_html):
@ -36,8 +36,8 @@ def test_scrape_contest_problems(mocker):
result = scrape_contest_problems("1900")
assert len(result) == 2
assert result[0] == Problem(id="a", name="A. Problem A")
assert result[1] == Problem(id="b", name="B. Problem B")
assert result[0] == ProblemSummary(id="a", name="A. Problem A")
assert result[1] == ProblemSummary(id="b", name="B. Problem B")
def test_scrape_network_error(mocker):