Skip to content

Commit 6ef4968

Browse files
authored
Merge pull request #1477 from cmu-delphi/fix_datafetcher_mock
Fix requests.get mock
2 parents 88476b1 + e8dac87 commit 6ef4968

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_delphi_utils_python/tests/validator/test_datafetcher.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def __init__(self, json_data, status_code):
3131

3232
def json(self):
3333
return self.json_data
34-
if kwargs["params"] == {'signal':'chng:inactive'}:
34+
if len(kwargs) == 0:
35+
return MockResponse([{'source': 'chng', 'db_source': 'chng'},
36+
{'source': 'covid-act-now', 'db_source': 'covid-act-now'}], 200)
37+
elif kwargs["params"] == {'signal': 'chng:inactive'}:
3538
return MockResponse([{"signals": [{"active": False}]}], 200)
3639
else:
3740
return MockResponse([{"signals": [{"active": True}]}], 200)

0 commit comments

Comments
 (0)