change update_provider_stats to use billable_units

updated tests etc, and removed some old tests that are no longer relevant
This commit is contained in:
Leo Hemsted
2016-08-03 17:22:20 +01:00
parent 527a5c4eaa
commit 143cfb526c
5 changed files with 19 additions and 102 deletions

View File

@@ -82,7 +82,7 @@ def send_sms_to_provider(self, service_id, notification_id):
notification_id,
SMS_TYPE,
provider.get_name(),
content_char_count=template.replaced_content_count
billable_units=notification.billable_units
)
notification.sent_at = datetime.utcnow()
@@ -164,7 +164,8 @@ def send_email_to_provider(self, service_id, notification_id):
update_provider_stats(
notification_id,
EMAIL_TYPE,
provider.get_name()
provider.get_name(),
billable_units=1
)
notification.reference = reference
notification.sent_at = datetime.utcnow()