mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
look for 'live', not 'production'
config['NOTIFY_ENVIRONMENT'] is hardcoded to `'live'` in the Live config class. The values as seen on the environment which we send real messages from: ``` >>> json.loads(os.environ['VCAP_APPLICATION'])['space_name'] # what cloudfoundry sets 'production' >>> os.environ['NOTIFY_ENVIRONMENT'] # we set this from cloudfoundry 'production' >>> current_app.config['NOTIFY_ENVIRONMENT'] # hardcoded in the Live config 'live' >>> current_app.config['NOTIFICATION_QUEUE_PREFIX'] # pulled from env var of same name 'live' >>> current_app.config['ENV'] # this is an unrelated flask variable 'production' ```
This commit is contained in:
@@ -122,7 +122,7 @@ def test_send_broadcast_event_creates_zendesk_p1(mocker, notify_api, sample_broa
|
||||
|
||||
mocker.patch('app.celery.broadcast_message_tasks.send_broadcast_provider_message')
|
||||
|
||||
with set_config(notify_api, 'NOTIFY_ENVIRONMENT', 'production'):
|
||||
with set_config(notify_api, 'NOTIFY_ENVIRONMENT', 'live'):
|
||||
send_broadcast_event(event.id)
|
||||
|
||||
assert mock_create_ticket.call_count == 1
|
||||
|
||||
Reference in New Issue
Block a user