mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
Updated cf conf unit tests
This commit is contained in:
@@ -42,7 +42,7 @@ def extract_notify_config(notify_config):
|
|||||||
os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret']
|
os.environ['ADMIN_CLIENT_SECRET'] = notify_config['credentials']['admin_client_secret']
|
||||||
os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key']
|
os.environ['SECRET_KEY'] = notify_config['credentials']['secret_key']
|
||||||
os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt']
|
os.environ['DANGEROUS_SALT'] = notify_config['credentials']['dangerous_salt']
|
||||||
os.environ['PERFORMANCE_PLATFORM_ENABLED'] = notify_config['credentials']['performance_platform_enabled']
|
os.environ['PERFORMANCE_PLATFORM_TOKEN'] = notify_config['credentials'].get('performance_platform_token')
|
||||||
|
|
||||||
|
|
||||||
def extract_notify_aws_config(aws_config):
|
def extract_notify_aws_config(aws_config):
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ def notify_config():
|
|||||||
'admin_client_secret': 'admin client secret',
|
'admin_client_secret': 'admin client secret',
|
||||||
'secret_key': 'secret key',
|
'secret_key': 'secret key',
|
||||||
'dangerous_salt': 'dangerous salt',
|
'dangerous_salt': 'dangerous salt',
|
||||||
|
'performance_platform_token': 'performance platform token'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,6 +147,7 @@ def test_notify_config():
|
|||||||
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
|
assert os.environ['ADMIN_CLIENT_SECRET'] == 'admin client secret'
|
||||||
assert os.environ['SECRET_KEY'] == 'secret key'
|
assert os.environ['SECRET_KEY'] == 'secret key'
|
||||||
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
|
assert os.environ['DANGEROUS_SALT'] == 'dangerous salt'
|
||||||
|
assert os.environ['PERFORMANCE_PLATFORM_TOKEN'] == 'performance platform token'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
|
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
|
||||||
|
|||||||
Reference in New Issue
Block a user