Delete redundant test

Not needed now that the test above this one is parametrized.
This commit is contained in:
Chris Hill-Scott
2016-11-07 15:35:15 +00:00
parent aef62dcffb
commit f34b58e7cd
2 changed files with 0 additions and 47 deletions

View File

@@ -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',

View File

@@ -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 <b>content</b>',
'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: