Removed contented updates the notifications stats table

- As before this is now driven from the notifications history table

- Removed from updates and create
- Signatures changes to removed unused params hits many files
- Also potential issue around rate limiting - we used to get the number sent per day from the stats table - which was a single row lookup, now we have to count this. This applies to EVERY API CALL. Probably not a good thing and should be addressed urgently.
This commit is contained in:
Martyn Inglis
2016-08-25 11:55:38 +01:00
parent 708f566c24
commit 893164ae40
12 changed files with 72 additions and 351 deletions

View File

@@ -308,9 +308,6 @@ def test_should_go_into_technical_error_if_exceeds_retries(
db_notification = Notification.query.filter_by(id=notification.id).one()
assert db_notification.status == 'technical-failure'
notification_stats = NotificationStatistics.query.filter_by(service_id=notification.service.id).first()
assert notification_stats.sms_requested == 1
assert notification_stats.sms_failed == 1
def test_should_send_sms_sender_from_service_if_present(
@@ -419,9 +416,6 @@ def test_send_email_to_provider_should_go_into_technical_error_if_exceeds_retrie
db_notification = Notification.query.filter_by(id=notification.id).one()
assert db_notification.status == 'technical-failure'
notification_stats = NotificationStatistics.query.filter_by(service_id=notification.service.id).first()
assert notification_stats.emails_requested == 1
assert notification_stats.emails_failed == 1
def test_send_email_to_provider_should_not_send_to_provider_when_status_is_not_created(notify_db, notify_db_session,