mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
ken-use-only-new-service-permissions
This commit is contained in:
@@ -1147,7 +1147,7 @@ def test_should_not_allow_international_number_on_sms_notification(client, sampl
|
||||
def test_should_allow_international_number_on_sms_notification(client, notify_db, notify_db_session, mocker):
|
||||
mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||
|
||||
service = sample_service(notify_db, notify_db_session, can_send_international_sms=True)
|
||||
service = sample_service(notify_db, notify_db_session, permissions=['international_sms'])
|
||||
template = create_sample_template(notify_db, notify_db_session, service=service)
|
||||
|
||||
data = {
|
||||
|
||||
@@ -317,6 +317,6 @@ def test_rejects_api_calls_with_international_numbers_if_service_does_not_allow_
|
||||
|
||||
@pytest.mark.parametrize('key_type', ['test', 'normal'])
|
||||
def test_allows_api_calls_with_international_numbers_if_service_does_allow_int_sms(sample_service, key_type):
|
||||
sample_service.can_send_international_sms = True
|
||||
sample_service.permissions = ['international_sms']
|
||||
result = validate_and_format_recipient('20-12-1234-1234', key_type, sample_service, 'sms')
|
||||
assert result == '201212341234'
|
||||
|
||||
Reference in New Issue
Block a user