-
Notifications
You must be signed in to change notification settings - Fork 67
Fix covid hosp as_of to only return latest issue #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
with self.subTest(name='as_of with multiple issues'): | ||
response = Epidata.covid_hosp('PA', 20201118, as_of=20201103) | ||
self.assertEqual(response['result'], 1) | ||
self.assertEqual(len(response['epidata']), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the test that will fail with the old code, since it returns a length of 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, otherwise 👍
Co-authored-by: Katie Mazaitis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
closes
Prerequisites:
dev
branchdev
Summary
Bug fix: Previously as_of was returning all isues <= as_of date. This changes it to only return the latest issue <= as_of date