Updated schema to remove redundant 'content'

This commit is contained in:
Ken Tsang
2017-03-23 11:50:15 +00:00
parent 41f82c0aef
commit 50db538df7
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ def create_post_template_preview_response(template, body, url_root):
"id": template.id, "id": template.id,
"type": template.template_type, "type": template.template_type,
"version": template.version, "version": template.version,
"content": {'body': body}, "body": body,
"subject": template.subject, "subject": template.subject,
"uri": "{}v2/template/{}/preview".format(url_root, template.id) "uri": "{}v2/template/{}/preview".format(url_root, template.id)
} }

View File

@@ -32,7 +32,7 @@ def test_valid_post_template_returns_200(client, sample_service, tmp_type):
assert resp_json['id'] == str(template.id) assert resp_json['id'] == str(template.id)
assert 'v2/template/{}/preview'.format(template.id) in resp_json['uri'] assert 'v2/template/{}/preview'.format(template.id) in resp_json['uri']
assert 'Dear {}'.format(valid_data['personalisation']['Name']) in resp_json['content']['body'] assert 'Dear {}'.format(valid_data['personalisation']['Name']) in resp_json['body']
@pytest.mark.parametrize("tmp_type", TEMPLATE_TYPES) @pytest.mark.parametrize("tmp_type", TEMPLATE_TYPES)