Skip to content

Commit cd665bd

Browse files
committed
Fix failing test
1 parent 3f5e1a6 commit cd665bd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

integrations/client/test_delphi_epidata.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,15 @@ def test_async_epidata(self):
339339
self.params_from_row(rows[0], source='covidcast'),
340340
self.params_from_row(rows[1], source='covidcast')
341341
]*12, batch_size=10)
342-
responses = [i[0] for i in test_output]
343-
# check response is same as standard covidcast call, using 24 calls to test batch sizing
342+
responses = [i[0]["epidata"] for i in test_output]
343+
# check response is same as standard covidcast call (minus fields omitted by the api.php endpoint),
344+
# using 24 calls to test batch sizing
345+
ignore_fields = ["source", "time_type", "geo_type"]
344346
self.assertEqual(
345347
responses,
346348
[
347-
Epidata.covidcast(**self.params_from_row(rows[0])),
348-
Epidata.covidcast(**self.params_from_row(rows[1])),
349+
[{k: v for k, v in row.items() if k not in ignore_fields} for row in Epidata.covidcast(**self.params_from_row(rows[0]))["epidata"]],
350+
[{k: v for k, v in row.items() if k not in ignore_fields} for row in Epidata.covidcast(**self.params_from_row(rows[1]))["epidata"]],
349351
]*12
350352
)
351353

0 commit comments

Comments
 (0)