Update tests to set observed to datetimes

This commit is contained in:
Emma Rose 2019-10-29 14:38:44 -04:00
Родитель b875356bf4
Коммит d962ab98ae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 1486642516ED3535
1 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -111,7 +111,7 @@ class TestAlertGeoModel(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 37.773972, 'latitude': 37.773972,
'longitude': -122.431297, 'longitude': -122.431297,
'observed': _NOW - timedelta(minutes=16), 'observed': (_NOW - timedelta(minutes=16)).isoformat(),
'geopoint': '37.773972,-122.431297', 'geopoint': '37.773972,-122.431297',
}, },
'destination': { 'destination': {
@ -120,7 +120,7 @@ class TestAlertGeoModel(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3849, 'longitude': -79.3849,
'observed': _NOW, 'observed': _NOW.isoformat(),
'geopoint': '43.6529,-79.3849', 'geopoint': '43.6529,-79.3849',
}, },
} }
@ -276,7 +276,7 @@ class TestOnePreviousLocality(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3849, 'longitude': -79.3849,
'observed': _NOW - timedelta(minutes=5), 'observed': (_NOW - timedelta(minutes=5)).isoformat(),
'geopoint': '43.6529,-79.3849', 'geopoint': '43.6529,-79.3849',
}, },
'destination': { 'destination': {
@ -285,7 +285,7 @@ class TestOnePreviousLocality(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 37.773972, 'latitude': 37.773972,
'longitude': -122.431297, 'longitude': -122.431297,
'observed': _NOW, 'observed': _NOW.isoformat(),
'geopoint': '37.773972,-122.431297', 'geopoint': '37.773972,-122.431297',
}, },
} }
@ -357,7 +357,7 @@ class TestInitialLocalityPositiveAlert(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 37.773972, 'latitude': 37.773972,
'longitude': -122.431297, 'longitude': -122.431297,
'observed': _NOW - timedelta(minutes=3), 'observed': (_NOW - timedelta(minutes=3)).isoformat(),
'geopoint': '37.773972,-122.431297', 'geopoint': '37.773972,-122.431297',
}, },
'destination': { 'destination': {
@ -366,7 +366,7 @@ class TestInitialLocalityPositiveAlert(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3849, 'longitude': -79.3849,
'observed': _NOW, 'observed': _NOW.isoformat(),
'geopoint': '43.6529,-79.3849', 'geopoint': '43.6529,-79.3849',
}, },
} }
@ -518,7 +518,7 @@ class TestMultipleEventsInWindow(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3849, 'longitude': -79.3849,
'observed': _NOW - timedelta(minutes=4), 'observed': (_NOW - timedelta(minutes=4)).isoformat(),
'geopoint': '43.6529,-79.3849', 'geopoint': '43.6529,-79.3849',
}, },
'destination': { 'destination': {
@ -527,7 +527,7 @@ class TestMultipleEventsInWindow(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 37.773972, 'latitude': 37.773972,
'longitude': -122.431297, 'longitude': -122.431297,
'observed': _NOW - timedelta(minutes=1), 'observed': (_NOW - timedelta(minutes=1)).isoformat(),
'geopoint': '37.773972,-122.431297', 'geopoint': '37.773972,-122.431297',
}, },
} }
@ -660,7 +660,7 @@ class TestSameCitiesFarAway(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 43.6614, 'latitude': 43.6614,
'longitude': -70.2553, 'longitude': -70.2553,
'observed': _NOW - timedelta(minutes=3), 'observed': (_NOW - timedelta(minutes=3)).isoformat(),
'geopoint': '43.6614,-70.2553', 'geopoint': '43.6614,-70.2553',
}, },
'destination': { 'destination': {
@ -669,7 +669,7 @@ class TestSameCitiesFarAway(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 45.5234, 'latitude': 45.5234,
'longitude': -122.6762, 'longitude': -122.6762,
'observed': _NOW, 'observed': _NOW.isoformat(),
'geopoint': '45.5234,-122.6762', 'geopoint': '45.5234,-122.6762',
}, },
} }
@ -787,7 +787,7 @@ class TestMultipleImpossibleJourneys(GeoModelTest):
'country': 'US', 'country': 'US',
'latitude': 45.5234, 'latitude': 45.5234,
'longitude': -122.6762, 'longitude': -122.6762,
'observed': _NOW - timedelta(minutes=5), 'observed': (_NOW - timedelta(minutes=5)).isoformat(),
'geopoint': '45.5234,-122.6762', 'geopoint': '45.5234,-122.6762',
}, },
'destination': { 'destination': {
@ -796,7 +796,7 @@ class TestMultipleImpossibleJourneys(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3843, 'longitude': -79.3843,
'observed': _NOW - timedelta(minutes=2), 'observed': (_NOW - timedelta(minutes=2)).isoformat(),
'geopoint': '43.6529,-79.3843', 'geopoint': '43.6529,-79.3843',
}, },
}, },
@ -807,7 +807,7 @@ class TestMultipleImpossibleJourneys(GeoModelTest):
'country': 'CA', 'country': 'CA',
'latitude': 43.6529, 'latitude': 43.6529,
'longitude': -79.3843, 'longitude': -79.3843,
'observed': _NOW - timedelta(minutes=2), 'observed': (_NOW - timedelta(minutes=2)).isoformat(),
'geopoint': '43.6529,-79.3843', 'geopoint': '43.6529,-79.3843',
}, },
'destination': { 'destination': {
@ -816,13 +816,13 @@ class TestMultipleImpossibleJourneys(GeoModelTest):
'country': 'RU', 'country': 'RU',
'latitude': 59.9343, 'latitude': 59.9343,
'longitude': 30.3351, 'longitude': 30.3351,
'observed': _NOW, 'observed': _NOW.isoformat(),
'geopoint': '59.9343,30.3351', 'geopoint': '59.9343,30.3351',
}, },
}, },
], ],
}, },
'severity': 'INFO', 'severity': 'WARNING',
'tags': ['geomodel'], 'tags': ['geomodel'],
} }