mirror of
https://github.com/GSA/notifications-api.git
synced 2026-04-30 06:09:58 -04:00
Rename model
Reflects the new name of the feature. Note that the name of the underlying table hasn’t changed because it’s explicitly set to `service_whitelist`. Changing this will be a more involved process.
This commit is contained in:
@@ -5,7 +5,7 @@ from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from app import encryption
|
||||
from app.models import (
|
||||
ServiceWhitelist,
|
||||
ServiceGuestList,
|
||||
Notification,
|
||||
SMS_TYPE,
|
||||
MOBILE_TYPE,
|
||||
@@ -38,7 +38,7 @@ from tests.app.db import (
|
||||
'+44 7700 900678'
|
||||
])
|
||||
def test_should_build_service_whitelist_from_mobile_number(mobile_number):
|
||||
service_whitelist = ServiceWhitelist.from_string('service_id', MOBILE_TYPE, mobile_number)
|
||||
service_whitelist = ServiceGuestList.from_string('service_id', MOBILE_TYPE, mobile_number)
|
||||
|
||||
assert service_whitelist.recipient == mobile_number
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_should_build_service_whitelist_from_mobile_number(mobile_number):
|
||||
'test@example.com'
|
||||
])
|
||||
def test_should_build_service_whitelist_from_email_address(email_address):
|
||||
service_whitelist = ServiceWhitelist.from_string('service_id', EMAIL_TYPE, email_address)
|
||||
service_whitelist = ServiceGuestList.from_string('service_id', EMAIL_TYPE, email_address)
|
||||
|
||||
assert service_whitelist.recipient == email_address
|
||||
|
||||
@@ -59,7 +59,7 @@ def test_should_build_service_whitelist_from_email_address(email_address):
|
||||
])
|
||||
def test_should_not_build_service_whitelist_from_invalid_contact(recipient_type, contact):
|
||||
with pytest.raises(ValueError):
|
||||
ServiceWhitelist.from_string('service_id', recipient_type, contact)
|
||||
ServiceGuestList.from_string('service_id', recipient_type, contact)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('initial_statuses, expected_statuses', [
|
||||
|
||||
Reference in New Issue
Block a user