Skip to content
Merged
Prev Previous commit
Next Next commit
now tests work :P
  • Loading branch information
ExpDev07 committed Mar 26, 2020
commit 7a03f7714fbf2de9acb90108d0ecd06e76866cfa
11 changes: 5 additions & 6 deletions tests/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def __init__(self, latest):

return TestTimeline(args[0])

@pytest.mark.parametrize("test_id, country, country_code, country_population, province, county, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest", [
(0, "Thailand", "TH", 1000, "", "", 15, 100, 1000, 1111, 22222),
(1, "Deutschland", "DE", 1000, "", "", 15, 100, 1000, 1111, 22222),
(2, "Cruise Ship", "XX", 1000, "", "", 15, 100, 1000, 1111, 22222)
@pytest.mark.parametrize("test_id, country, country_code, country_population, province, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest", [
(0, "Thailand", "TH", 1000, "", 15, 100, 1000, 1111, 22222),
(1, "Deutschland", "DE", 1000, "", 15, 100, 1000, 1111, 22222),
(2, "Cruise Ship", "XX", 1000, "", 15, 100, 1000, 1111, 22222)
])
@mock.patch('app.timeline.Timeline', side_effect=mocked_timeline)
def test_location_class(mocked_timeline, test_id, country, country_code, country_population, province, county, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest):
def test_location_class(mocked_timeline, test_id, country, country_code, country_population, province, latitude, longitude, confirmed_latest, deaths_latest, recovered_latest):

# id, country, province, coordinates, confirmed, deaths, recovered
coords = coordinates.Coordinates(latitude=latitude, longitude=longitude)
Expand Down Expand Up @@ -45,7 +45,6 @@ def test_location_class(mocked_timeline, test_id, country, country_code, country
'country_code': country_code,
'country_population': country_population,
'province': province,
'county': county,
'last_updated': now,
'coordinates': {
'latitude': latitude,
Expand Down