time adjustments in tests

This commit is contained in:
stvnrlly
2022-11-14 14:23:54 -05:00
parent 3528bd37e1
commit 213f699c99
7 changed files with 25 additions and 17 deletions

View File

@@ -46,7 +46,7 @@ def mocker_get_rate(
return Decimal(0)
@freeze_time('2019-08-01')
@freeze_time('2019-08-01T05:30')
@pytest.mark.parametrize('day_start, expected_kwargs', [
(None, [f'2019-07-{31-i}' for i in range(10)]),
('2019-07-21', [f'2019-07-{21-i}' for i in range(10)]),
@@ -77,7 +77,7 @@ def test_create_nightly_notification_status_triggers_tasks(
mock_celery.assert_called_with(
kwargs={
'service_id': sample_service.id,
'process_day': '2019-07-31',
'process_day': '2019-07-30',
'notification_type': SMS_TYPE
},
queue=QueueNames.REPORTING
@@ -499,7 +499,7 @@ def test_create_nightly_billing_for_day_use_BST(
# too early
create_notification(
created_at=datetime(2018, 3, 25, 4, 59),
created_at=datetime(2018, 3, 25, 3, 59),
template=sample_template,
status='delivered',
rate_multiplier=1.0,