mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
broadcasts: test helper uses areas from message
instead of looking at "transmitted_areas" argument in the create_broadcast_event, we should use the areas from the broadcast message we should be explicit in our tests about which areas we are sending, the tests were implicitly using the default, rather than the areas from the broadcast message which was confusing Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Richard <richard.baker@digital.cabinet-office.gov.uk> Co-authored-by: David <david.mcdonald@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -1042,9 +1042,7 @@ def create_broadcast_event(
|
||||
sent_at=sent_at or datetime.utcnow(),
|
||||
message_type=message_type,
|
||||
transmitted_content=transmitted_content or {'body': 'this is an emergency broadcast message'},
|
||||
transmitted_areas=transmitted_areas or {
|
||||
'areas': ['london'], 'simple_polygons': [[[50.12, 1.2], [50.13, 1.2], [50.14, 1.21]]]
|
||||
},
|
||||
transmitted_areas=transmitted_areas or broadcast_message.areas,
|
||||
transmitted_sender=transmitted_sender or 'www.notifications.service.gov.uk',
|
||||
transmitted_starts_at=transmitted_starts_at,
|
||||
transmitted_finishes_at=transmitted_finishes_at or datetime.utcnow(),
|
||||
|
||||
Reference in New Issue
Block a user