Initialise clients outside the app

This avoids the annoying problem where you can’t import a client unless
the app has already been initialised.
This commit is contained in:
Chris Hill-Scott
2018-10-26 15:39:32 +01:00
parent 2bf2103cce
commit 9e798506c5
21 changed files with 77 additions and 41 deletions

View File

@@ -26,3 +26,6 @@ class TemplateStatisticsApiClient(NotifyAdminAPIClient):
return self.get(
url='/service/{}/template-statistics/{}'.format(service_id, template_id)
)['data']
template_statistics_client = TemplateStatisticsApiClient()