diff --git a/tests/test_location.py b/tests/test_location.py index 50129a52..3a78468d 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -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 diff --git a/tests/test_routes.py b/tests/test_routes.py index 5143ca8a..63b39998 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -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()