From f34b58e7cd3c68f6fab7868cf68371266edf5a8f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 7 Nov 2016 15:35:15 +0000 Subject: [PATCH] Delete redundant test Not needed now that the test above this one is parametrized. --- tests/app/dao/test_templates_dao.py | 17 ---------------- tests/app/template/test_rest.py | 30 ----------------------------- 2 files changed, 47 deletions(-) diff --git a/tests/app/dao/test_templates_dao.py b/tests/app/dao/test_templates_dao.py index 287db454c..95eb9b19c 100644 --- a/tests/app/dao/test_templates_dao.py +++ b/tests/app/dao/test_templates_dao.py @@ -32,23 +32,6 @@ def test_create_template(sample_service, sample_user, template_type, subject): assert dao_get_all_templates_for_service(sample_service.id)[0].name == 'Sample Template' -def test_create_email_template(sample_service, sample_user): - data = { - 'name': 'Sample Template', - 'template_type': "email", - 'subject': "subject", - 'content': "Template content", - 'service': sample_service, - 'created_by': sample_user - } - template = Template(**data) - dao_create_template(template) - - assert Template.query.count() == 1 - assert len(dao_get_all_templates_for_service(sample_service.id)) == 1 - assert dao_get_all_templates_for_service(sample_service.id)[0].name == 'Sample Template' - - def test_update_template(sample_service, sample_user): data = { 'name': 'Sample Template', diff --git a/tests/app/template/test_rest.py b/tests/app/template/test_rest.py index 8f18e5f0e..890410bd3 100644 --- a/tests/app/template/test_rest.py +++ b/tests/app/template/test_rest.py @@ -49,36 +49,6 @@ def test_should_create_a_new_template_for_a_service( assert not json_resp['data']['subject'] -def test_should_create_a_new_email_template_for_a_service(notify_api, sample_user, sample_service): - with notify_api.test_request_context(): - with notify_api.test_client() as client: - data = { - 'name': 'my template', - 'template_type': 'email', - 'subject': 'subject', - 'content': 'template content', - 'service': str(sample_service.id), - 'created_by': str(sample_user.id) - } - data = json.dumps(data) - auth_header = create_authorization_header() - - response = client.post( - '/service/{}/template'.format(sample_service.id), - headers=[('Content-Type', 'application/json'), auth_header], - data=data - ) - assert response.status_code == 201 - json_resp = json.loads(response.get_data(as_text=True)) - assert json_resp['data']['name'] == 'my template' - assert json_resp['data']['template_type'] == 'email' - assert json_resp['data']['content'] == 'template content' - assert json_resp['data']['service'] == str(sample_service.id) - assert json_resp['data']['subject'] == 'subject' - assert json_resp['data']['version'] == 1 - assert json_resp['data']['id'] - - def test_should_be_error_if_service_does_not_exist_on_create(notify_api, sample_user, fake_uuid): with notify_api.test_request_context(): with notify_api.test_client() as client: