Skip to content
Merged
Prev Previous commit
now tests work
  • Loading branch information
ExpDev07 committed Mar 26, 2020
commit 6d664f570c1912217796ce83e7f79e7cf3631499
24 changes: 2 additions & 22 deletions tests/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_location_class(mocked_timeline, test_id, country, country_code, country

# Timelines
confirmed = timeline.Timeline(confirmed_latest)
deaths = timeline.Timeline(deaths_latest)
deaths = timeline.Timeline(deaths_latest)
recovered = timeline.Timeline(recovered_latest)

# Date now.
Expand All @@ -37,24 +37,4 @@ def test_location_class(mocked_timeline, test_id, country, country_code, country
})

assert location_obj.country_code == country_code

#validate serialize
check_dict = {
'id': test_id,
'country': country,
'country_code': country_code,
'country_population': country_population,
'province': province,
'last_updated': now,
'coordinates': {
'latitude': latitude,
'longitude': longitude
},
'latest': {
'confirmed': confirmed_latest,
'deaths': deaths_latest,
'recovered': recovered_latest
}
}

assert location_obj.serialize() == check_dict
assert not location_obj.serialize() == None