Added a check that the call is not using a test api key.

Removed the tests for trial mode service for the scheduled tasks and the process job.
Having the validation in the POST notification and create job endpoint is enough.
Updated the test_service_whitelist test because the order of the array is not gaurenteed.
This commit is contained in:
Rebecca Law
2017-09-04 17:24:41 +01:00
parent d391919677
commit 19f964a90b
9 changed files with 34 additions and 129 deletions

View File

@@ -30,10 +30,9 @@ def test_get_whitelist_separates_emails_and_phones(client, sample_service):
response = client.get('service/{}/whitelist'.format(sample_service.id), headers=[create_authorization_header()])
assert response.status_code == 200
assert json.loads(response.get_data(as_text=True)) == {
'email_addresses': ['service@example.com'],
'phone_numbers': ['+1800-555-555', '07123456789']
}
json_resp = json.loads(response.get_data(as_text=True))
assert json_resp['email_addresses'] == ['service@example.com']
assert sorted(json_resp['phone_numbers']) == sorted(['+1800-555-555', '07123456789'])
def test_get_whitelist_404s_with_unknown_service_id(client):