-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename /template/category to /template-category
- Adjust tests - formatting
- Loading branch information
Showing
6 changed files
with
23 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
Notification, | ||
ServiceSafelist, | ||
) | ||
from tests.app.conftest import create_template_category | ||
from tests.app.db import ( | ||
create_inbound_number, | ||
create_letter_contact, | ||
|
@@ -34,10 +35,6 @@ | |
save_notification, | ||
) | ||
|
||
from tests.app.conftest import ( | ||
create_template_category, | ||
) | ||
|
||
|
||
@pytest.mark.parametrize("mobile_number", ["650 253 2222", "+1 650 253 2222"]) | ||
def test_should_build_service_safelist_from_mobile_number(mobile_number): | ||
|
@@ -370,18 +367,20 @@ def test_template_folder_is_parent(sample_service): | |
(EMAIL_TYPE, BULK, PRIORITY, PRIORITY, BULK), | ||
], | ||
) | ||
def test_template_process_type(notify_db, notify_db_session, template_type, process_type, sms_process_type, email_process_type, expected_template_process_type): | ||
def test_template_process_type( | ||
notify_db, | ||
notify_db_session, | ||
template_type, | ||
process_type, | ||
sms_process_type, | ||
email_process_type, | ||
expected_template_process_type, | ||
): | ||
category = create_template_category( | ||
notify_db, | ||
notify_db_session, | ||
sms_process_type = sms_process_type, | ||
email_process_type = email_process_type | ||
notify_db, notify_db_session, sms_process_type=sms_process_type, email_process_type=email_process_type | ||
) | ||
template = create_template( | ||
service=create_service(), | ||
template_type=template_type, | ||
process_type=process_type, | ||
category=category | ||
service=create_service(), template_type=template_type, process_type=process_type, category=category | ||
) | ||
|
||
assert template.template_process_type == expected_template_process_type | ||
|
@@ -403,4 +402,4 @@ class TestNotificationModel: | |
def test_queue_name_in_notifications(self, sample_service): | ||
template = create_template(sample_service, template_type="email") | ||
notification = save_notification(create_notification(template, to_field="[email protected]", queue_name="tester")) | ||
assert notification.queue_name == "tester" | ||
assert notification.queue_name == "tester" |