Skip to content

Commit b2b3ab8

Browse files
authored
Merge branch 'main' into bugfix/DBC22-5976
2 parents ad96f8c + c086818 commit b2b3ab8

2 files changed

Lines changed: 13 additions & 30 deletions

File tree

src/backend/apps/event/tests/test_event_notification.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -321,35 +321,17 @@ def test_generate_footer_message(self):
321321
msg = generate_settings_message(route)
322322
assert 'on January 01.' in msg
323323

324-
# Date range - PST
324+
# Date range - always PDT (BC no longer observes daylight saving)
325325
route = SavedRoutes(
326326
notification_types=[EVENT_DISPLAY_CATEGORY.MAJOR_DELAYS],
327327
notification_start_time=datetime.time(8, 0),
328328
notification_end_time=datetime.time(17, 0),
329329
notification_start_date=datetime.date(2023, 1, 1),
330330
notification_end_date=datetime.date(2023, 1, 7)
331331
)
332-
msg = generate_settings_message(
333-
route,
334-
test_time=datetime.datetime(2023, 1, 3, 0, 0, tzinfo=ZoneInfo('America/Vancouver'))
335-
)
336-
assert 'between 08:00am and 05:00pm Pacific Standard Time (PST) ' in msg
337-
assert 'from January 01 and January 07.' in msg
338-
339-
# Date range - PDT
340-
route = SavedRoutes(
341-
notification_types=[EVENT_DISPLAY_CATEGORY.MAJOR_DELAYS],
342-
notification_start_time=datetime.time(8, 0),
343-
notification_end_time=datetime.time(17, 0),
344-
notification_start_date=datetime.date(2023, 4, 1),
345-
notification_end_date=datetime.date(2023, 4, 7)
346-
)
347-
msg = generate_settings_message(
348-
route,
349-
test_time=datetime.datetime(2023, 4, 3, 0, 0, tzinfo=ZoneInfo('America/Vancouver'))
350-
)
332+
msg = generate_settings_message(route)
351333
assert 'between 08:00am and 05:00pm Pacific Daylight Time (PDT) ' in msg
352-
assert 'from April 01 and April 07.' in msg
334+
assert 'from January 01 and January 07.' in msg
353335

354336
# Days of the week
355337
route = SavedRoutes(

src/backend/apps/wildfire/tests/test_wildfire_populate.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,23 @@ def test_populate_wildfire_function(self):
124124
out_of_control_feature = self.feature_by_id(self.parsed_features, 'K70659')
125125
area_data = self.areas_dict['G70422']
126126

127-
# Under Control, not populated
128-
under_control_data = {
129-
**self.combine_with_area(holding_feature),
130-
'status': WILDFIRE_STATUS.UNDR_CNTRL,
131-
}
132-
assert populate_wildfire_from_data(under_control_data) is None
133-
assert not Wildfire.objects.filter(id='G90400').exists()
134-
135127
# Out, not populated
136128
out_data = {
137129
**self.combine_with_area(holding_feature),
138130
'status': WILDFIRE_STATUS.OUT,
139131
}
140-
populate_wildfire_from_data(out_data)
132+
assert populate_wildfire_from_data(out_data) is None
141133
assert not Wildfire.objects.filter(id='G90400').exists()
142134

135+
# Under Control
136+
under_control_data = {
137+
**self.combine_with_area(holding_feature),
138+
'status': WILDFIRE_STATUS.UNDR_CNTRL,
139+
}
140+
assert populate_wildfire_from_data(under_control_data) == 'G90400'
141+
wildfire = Wildfire.objects.get(id='G90400')
142+
assert wildfire.status == WILDFIRE_STATUS.UNDR_CNTRL
143+
143144
# Being Held
144145
populate_wildfire_from_data(self.combine_with_area(holding_feature))
145146
wildfire = Wildfire.objects.get(id='G90400')

0 commit comments

Comments
 (0)