Update the post letter flow - not able to get reduce the dB transactions used in the letter flow. Prioritising the reduction for the SMS/Email flow.

Only update the daily limit cache if the service is in trial mode.
This commit is contained in:
Rebecca Law
2020-06-17 12:11:28 +01:00
parent 21a1b8e8bd
commit a5ed8f2079
5 changed files with 175 additions and 169 deletions

View File

@@ -426,7 +426,7 @@ def test_returns_a_429_limit_exceeded_if_rate_limit_exceeded(
):
sample = create_template(service=sample_service, template_type=notification_type)
persist_mock = mocker.patch('app.v2.notifications.post_notifications.persist_notification')
deliver_mock = mocker.patch('app.v2.notifications.post_notifications.send_notification_to_queue')
deliver_mock = mocker.patch('app.v2.notifications.post_notifications.send_notification_to_queue_detached')
mocker.patch(
'app.v2.notifications.post_notifications.check_rate_limiting',
side_effect=RateLimitError("LIMIT", "INTERVAL", "TYPE"))