File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
functions-python/process_validation_report/tests Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 22import unittest
33from unittest import mock
44from unittest .mock import MagicMock , patch
5+ from datetime import datetime , timezone
56
67from faker import Faker
78
@@ -224,8 +225,15 @@ def test_populate_service_date_valid_dates(self):
224225
225226 populate_service_date (dataset , json_report )
226227
227- self .assertEqual (dataset .service_date_range_start , "2024-01-01" )
228- self .assertEqual (dataset .service_date_range_end , "2024-12-31" )
228+ expected_range_start = datetime .strptime ("2024-01-01" , "%Y-%m-%d" ).replace (
229+ hour = 0 , minute = 0 , tzinfo = timezone .utc
230+ )
231+ expected_range_end = datetime .strptime ("2024-12-31" , "%Y-%m-%d" ).replace (
232+ hour = 23 , minute = 59 , tzinfo = timezone .utc
233+ )
234+
235+ self .assertEqual (dataset .service_date_range_start , expected_range_start )
236+ self .assertEqual (dataset .service_date_range_end , expected_range_end )
229237
230238 def test_populate_service_date_valid_empty_dates (self ):
231239 """Test populate_service_date function."""
You can’t perform that action at this time.
0 commit comments