Refactored tests to use fake_uuid

This commit is contained in:
Ken Tsang
2017-03-22 14:31:16 +00:00
parent ecbe87a0d6
commit 41f82c0aef
2 changed files with 4 additions and 8 deletions

View File

@@ -41,12 +41,10 @@ def test_get_email_template_by_id_returns_200(client, sample_service, tmp_type,
assert json_response == expected_response
def test_get_template_with_non_existent_template_id_returns_404(client, sample_service):
def test_get_template_with_non_existent_template_id_returns_404(client, fake_uuid, sample_service):
auth_header = create_authorization_header(service_id=sample_service.id)
random_template_id = str(uuid.uuid4())
response = client.get(path='/v2/template/{}'.format(random_template_id),
response = client.get(path='/v2/template/{}'.format(fake_uuid),
headers=[('Content-Type', 'application/json'), auth_header])
assert response.status_code == 404