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:
Chris Hill-Scott
2020-07-28 10:22:13 +01:00
parent 4d896aa642
commit 083573e4dc
9 changed files with 35 additions and 35 deletions

View File

@@ -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', [