From 08b12a644369ec302c7ec24347586f0303ae221e Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Fri, 6 Dec 2019 12:03:23 +0000 Subject: [PATCH] Test that test key notifications are excluded form tv numbers query --- tests/app/dao/test_services_dao.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/app/dao/test_services_dao.py b/tests/app/dao/test_services_dao.py index 5769f94f4..9f36c4b7c 100644 --- a/tests/app/dao/test_services_dao.py +++ b/tests/app/dao/test_services_dao.py @@ -1100,6 +1100,10 @@ def test_dao_find_services_sending_to_tv_numbers(notify_db_session, fake_uuid): template_2 = create_template(service_2) create_notification(template_2, normalised_to=tv_number, status="permanent-failure") for x in range(0, 5): + # test key type is excluded + create_notification(template_2, normalised_to=tv_number, status="permanent-failure", key_type='test') + for x in range(0, 5): + # normal numbers are not counted by the query create_notification(template_2, normalised_to=normal_number, status="delivered") create_notification(template_2, normalised_to=normal_number_resembling_tv_number, status="delivered")