Simplify the code in the query.

The date in the notifications table should always be the most recent date for the template.
Removed the template_type param for the query as well.
Simplified the tests.
This commit is contained in:
Rebecca Law
2020-02-05 16:43:17 +00:00
parent 3a32c35dd2
commit dec42b06cc
4 changed files with 23 additions and 54 deletions

View File

@@ -221,7 +221,7 @@ def test_get_last_used_datetime_for_template_returns_400_if_service_does_not_exi
)
def test_get_last_used_datetime_for_template_returns_400_if_template_does_not_exist(
def test_get_last_used_datetime_for_template_returns_404_if_template_does_not_exist(
admin_request, sample_template
):
admin_request.get(