Skip to content

Commit

Permalink
Update integrations/acquisition/covidcast/test_coverage_crossref_upda…
Browse files Browse the repository at this point in the history
…te.py

Co-authored-by: george <[email protected]>
  • Loading branch information
nolangormley and melange396 authored Feb 3, 2025
1 parent b0be91f commit 3b137d8
Showing 1 changed file with 5 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,11 @@ def test_caching(self):
"""Populate, query, cache, query, and verify the cache."""

# insert dummy data
self._db._cursor.execute('''
INSERT INTO `signal_dim` (`signal_key_id`, `source`, `signal`)
VALUES
(42, 'src', 'sig');
''')
self._db._cursor.execute('''
INSERT INTO `geo_dim` (`geo_key_id`, `geo_type`, `geo_value`)
VALUES
(96, 'state', 'pa'),
(97, 'state', 'wa');
''')
self._db._cursor.execute(f'''
INSERT INTO
`epimetric_latest` (`epimetric_id`, `signal_key_id`, `geo_key_id`, `time_type`,
`time_value`, `value_updated_timestamp`,
`value`, `stderr`, `sample_size`,
`issue`, `lag`, `missing_value`,
`missing_stderr`,`missing_sample_size`)
VALUES
(15, 42, 96, 'day', 20200422,
123, 1, 2, 3, 20200422, 0, {Nans.NOT_MISSING}, {Nans.NOT_MISSING}, {Nans.NOT_MISSING}),
(16, 42, 97, 'day', 20200422,
789, 1, 2, 3, 20200423, 1, {Nans.NOT_MISSING}, {Nans.NOT_MISSING}, {Nans.NOT_MISSING})
''')
self._db.commit()
self._insert_rows([
CovidcastTestRow.make_default_row(geo_type="state", geo_value="pa"),
CovidcastTestRow.make_default_row(geo_type="state", geo_value="ny"),
CovidcastTestRow.make_default_row(geo_type="state", geo_value="ny", signal="sig2"),
])

results = self._make_request()

Expand Down

0 comments on commit 3b137d8

Please sign in to comment.