Change how we populate and retrieve MonthlyBilling totals:

1. For both email and sms, store [] in monthly_totals if
there is no billing data (no notifications sent etc.) and
return this via the API

2. General refactoring of indentation
This commit is contained in:
Imdad Ahad
2017-08-11 16:53:12 +01:00
parent 46ca086aa2
commit 94605d31fa
6 changed files with 78 additions and 92 deletions

View File

@@ -1862,7 +1862,9 @@ def test_get_monthly_billing_usage_returns_empty_list_if_no_notifications(client
headers=[create_authorization_header()]
)
assert response.status_code == 200
assert json.loads(response.get_data(as_text=True)) == []
results = json.loads(response.get_data(as_text=True))
assert results == []
def test_search_for_notification_by_to_field(client, notify_db, notify_db_session):