Skip to content

Commit

Permalink
Refactored by Sourcery
Browse files Browse the repository at this point in the history
  • Loading branch information
SourceryAI committed May 31, 2020
1 parent 4bde047 commit 6e5bc13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def test_location_class(
)

assert location_obj.country_code == country_code
assert not location_obj.serialize() == None
assert location_obj.serialize() is not None
4 changes: 2 additions & 2 deletions tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ async def test_v1_all(self):
assert return_data == json.loads(expected_json_output)

async def test_v2_latest(self):
state = "latest"

with mock.patch("app.services.location.jhu.datetime") as mock_datetime:
mock_datetime.utcnow.return_value.isoformat.return_value = DATETIME_STRING
mock_datetime.strptime.side_effect = mocked_strptime_isoformat
state = "latest"

response = await self.asgi_client.get(f"/v2/{state}")

return_data = response.json()
Expand Down

0 comments on commit 6e5bc13

Please sign in to comment.