fix(test): fix the scrapers
This commit is contained in:
parent
aedbccffb4
commit
1b77763648
3 changed files with 13 additions and 11 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue