Update the organsition usage endpoint to use the new query.

This endpoint may need to change, but we'd like to see how this performs, so we'll test this with a real data set. Then come back to make sure the format is correct and check for missing tests for the endpoint,
This commit is contained in:
Rebecca Law
2020-02-24 17:02:25 +00:00
parent b1b457eea0
commit a2d18f8598
4 changed files with 34 additions and 14 deletions

View File

@@ -122,7 +122,8 @@ def test_validate_date_is_within_a_financial_year_when_input_is_not_a_date(start
def test_get_usage_for_all_services(notify_db_session, admin_request):
org, org_2, service, service_2, service_3, service_sms_only = set_up_usage_data(datetime(2019, 5, 1))
org, org_2, service, service_2, service_3, service_sms_only, \
org_with_emails, service_with_emails = set_up_usage_data(datetime(2019, 5, 1))
response = admin_request.get("platform_stats.get_usage_for_all_services",
start_date='2019-05-01',
end_date='2019-06-30')