mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
Reduce expiry time to 22 hours 30 minutes
Theoretically the maximum expiry time of a broadcast should be 24 hours. If it goes over 24 hours there can be problems. However we want to make it more conservative to mitigate two potential issues: 1. The CBC has a repetition period (eg 60 seconds) and a count (eg 1,440). If these were slightly innaccurate or generous it could take us over 24 hours. For this reason we should give ourselves half an hour of buffer. 2. It’s possibly that the CBC could interpret a UTC time as BST or vice versa. Until we’re sure that it’s using UTC everywhere, we need to remove another whole hour as buffer. In total this means we remove 1 hour 30 minutes from 24 hours, giving an expiry time of 22 hours 30 minutes.
This commit is contained in:
@@ -2380,10 +2380,10 @@ def test_user_without_approve_permission_cant_approve_broadcast_they_created(
|
||||
('operator', '2020-02-23T02:22:22'),
|
||||
('test', '2020-02-23T02:22:22'),
|
||||
|
||||
# 23 hours 59 minutes later
|
||||
('severe', '2020-02-23T22:21:22'),
|
||||
('government', '2020-02-23T22:21:22'),
|
||||
(None, '2020-02-23T22:21:22'), # Training mode
|
||||
# 22 hours 30 minutes later
|
||||
('severe', '2020-02-23T20:52:22'),
|
||||
('government', '2020-02-23T20:52:22'),
|
||||
(None, '2020-02-23T20:52:22'), # Training mode
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
'trial_mode, initial_status, post_data, expected_approval, expected_redirect',
|
||||
|
||||
Reference in New Issue
Block a user