retrieve sms ip whitelist from credentials on paas

This commit is contained in:
venusbb
2017-07-10 17:03:43 +01:00
parent c0af82ebcb
commit 5089a4d53b
5 changed files with 16 additions and 7 deletions

View File

@@ -16,7 +16,8 @@ def notify_config():
'admin_client_secret': 'admin client secret',
'secret_key': 'secret key',
'dangerous_salt': 'dangerous salt',
'performance_platform_token': 'performance platform token'
'performance_platform_token': 'performance platform token',
'allow_ip_inbound_sms': ['111.111.111.111', '100.100.100.100']
}
}
@@ -197,3 +198,10 @@ def test_redis_config():
assert os.environ['REDIS_ENABLED'] == '1'
assert os.environ['REDIS_URL'] == 'redis url'
@pytest.mark.usefixtures('os_environ', 'cloudfoundry_environ')
def test_sms_config():
extract_cloudfoundry_config()
assert os.environ['SMS_INBOUND_WHITELIST'] == ['111.111.111.111', '100.100.100.100']