test(codechef): add fixture for /api/list/contests/past endpoint
This commit is contained in:
parent
3b3da9ab9b
commit
4b6b51b8df
2 changed files with 19 additions and 0 deletions
|
|
@ -221,6 +221,9 @@ def run_scraper_offline(fixture_text):
|
|||
if "/api/list/contests/all" in url:
|
||||
data = json.loads(fixture_text("codechef/contests.json"))
|
||||
return MockResponse(data)
|
||||
if "/api/list/contests/past" in url:
|
||||
data = json.loads(fixture_text("codechef/contests_past.json"))
|
||||
return MockResponse(data)
|
||||
if "/api/contests/START" in url and "/problems/" not in url:
|
||||
contest_id = url.rstrip("/").split("/")[-1]
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue