diff --git a/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py b/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py index 5be86675514a91c6efba42e163faad829a6b7ef7..577932cd868df45bc7335df4a3c67f91ecbb56b3 100755 --- a/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py +++ b/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py @@ -948,12 +948,12 @@ class TestStationTimeLine(unittest.TestCase): models.StationTimeline.objects.create(**test_data) self.assertIn('unique_station_time_line', str(context.exception)) - self.assertEqual(len(models.StationTimeline.objects.filter(timestamp=datetime.date.today())), 1) + self.assertEqual(len(models.StationTimeline.objects.filter(timestamp=datetime.date(2021, 4, 1))), 1) self.assertEqual(len(models.StationTimeline.objects.all()), 1) # Add a non-duplicate test_data["station_name"] = "CS002" models.StationTimeline.objects.create(**test_data) - self.assertEqual(len(models.StationTimeline.objects.filter(timestamp=datetime.date.today())), 2) + self.assertEqual(len(models.StationTimeline.objects.filter(timestamp=datetime.date(2021, 4, 1))), 2) self.assertEqual(len(models.StationTimeline.objects.all()), 2)