mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-07 01:58:25 -04:00
Remove unused config variables
We don't use FUNCTIONAL_TEST_PROVIDER_SERVICE_ID or UNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID anymore so we can safely delete them from config and tests.
This commit is contained in:
@@ -291,9 +291,6 @@ class Config(object):
|
|||||||
|
|
||||||
SIMULATED_SMS_NUMBERS = ('+447700900000', '+447700900111', '+447700900222')
|
SIMULATED_SMS_NUMBERS = ('+447700900000', '+447700900111', '+447700900222')
|
||||||
|
|
||||||
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = None
|
|
||||||
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = None
|
|
||||||
|
|
||||||
DVLA_BUCKETS = {
|
DVLA_BUCKETS = {
|
||||||
'job': '{}-dvla-file-per-job'.format(os.getenv('NOTIFY_ENVIRONMENT')),
|
'job': '{}-dvla-file-per-job'.format(os.getenv('NOTIFY_ENVIRONMENT')),
|
||||||
'notification': '{}-dvla-letter-api-files'.format(os.getenv('NOTIFY_ENVIRONMENT'))
|
'notification': '{}-dvla-letter-api-files'.format(os.getenv('NOTIFY_ENVIRONMENT'))
|
||||||
@@ -439,8 +436,6 @@ class Live(Config):
|
|||||||
INVALID_PDF_BUCKET_NAME = 'production-letters-invalid-pdf'
|
INVALID_PDF_BUCKET_NAME = 'production-letters-invalid-pdf'
|
||||||
STATSD_ENABLED = True
|
STATSD_ENABLED = True
|
||||||
FROM_NUMBER = 'GOVUK'
|
FROM_NUMBER = 'GOVUK'
|
||||||
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
|
||||||
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = 'ba9e1789-a804-40b8-871f-cc60d4c1286f'
|
|
||||||
PERFORMANCE_PLATFORM_ENABLED = True
|
PERFORMANCE_PLATFORM_ENABLED = True
|
||||||
API_RATE_LIMIT_ENABLED = True
|
API_RATE_LIMIT_ENABLED = True
|
||||||
CHECK_PROXY_HEADER = True
|
CHECK_PROXY_HEADER = True
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ from tests.app.conftest import (
|
|||||||
sample_template as create_sample_template,
|
sample_template as create_sample_template,
|
||||||
datetime_in_past
|
datetime_in_past
|
||||||
)
|
)
|
||||||
from tests.conftest import set_config_values
|
|
||||||
|
|
||||||
|
|
||||||
def _create_slow_delivery_notification(template, provider='mmg'):
|
def _create_slow_delivery_notification(template, provider='mmg'):
|
||||||
@@ -401,25 +400,6 @@ def test_send_total_sent_notifications_to_performance_platform_calls_with_correc
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
def test_switch_providers_on_slow_delivery_runs_if_config_set(
|
|
||||||
notify_api,
|
|
||||||
mocker,
|
|
||||||
prepare_current_provider
|
|
||||||
):
|
|
||||||
get_notifications_mock = mocker.patch(
|
|
||||||
'app.celery.scheduled_tasks.is_delivery_slow_for_provider',
|
|
||||||
return_value=[]
|
|
||||||
)
|
|
||||||
|
|
||||||
with set_config_values(notify_api, {
|
|
||||||
'FUNCTIONAL_TEST_PROVIDER_SERVICE_ID': '7954469d-8c6d-43dc-b8f7-86be2d69f5f3',
|
|
||||||
'FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID': '331a63e6-f1aa-4588-ad3f-96c268788ae7'
|
|
||||||
}):
|
|
||||||
switch_current_sms_provider_on_slow_delivery()
|
|
||||||
|
|
||||||
assert get_notifications_mock.called is True
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="Not switching it on yet")
|
@pytest.mark.skip(reason="Not switching it on yet")
|
||||||
def test_switch_providers_on_slow_delivery_switches_once_then_does_not_switch_if_already_switched(
|
def test_switch_providers_on_slow_delivery_switches_once_then_does_not_switch_if_already_switched(
|
||||||
notify_api,
|
notify_api,
|
||||||
|
|||||||
Reference in New Issue
Block a user