From 33e8e55dc6e4521eb94816063bf5a18f81dd3315 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Wed, 3 Jan 2018 15:30:26 +0000 Subject: [PATCH] Update the tests and revert adding the service_letter_contact_id --- app/schemas.py | 2 +- tests/app/template/test_rest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/schemas.py b/app/schemas.py index dccd50e6f..a61dcba11 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -322,7 +322,7 @@ class BaseTemplateSchema(BaseSchema): class Meta: model = models.Template - exclude = ("service_id", "jobs") + exclude = ("service_id", "jobs", "service_letter_contact_id") strict = True diff --git a/tests/app/template/test_rest.py b/tests/app/template/test_rest.py index 8f32458f1..ce186e58d 100644 --- a/tests/app/template/test_rest.py +++ b/tests/app/template/test_rest.py @@ -581,7 +581,7 @@ def test_create_a_template_with_reply_to(admin_request, sample_user): json_resp = admin_request.post('template.create_template', service_id=service.id, _data=data, _expected_status=201) assert json_resp['data']['template_type'] == 'letter' - assert json_resp['data']['reply_to'] == str(letter_contact.id) + assert json_resp['data']['reply_to'] == str(letter_contact.contact_block) template = Template.query.get(json_resp['data']['id']) from app.schemas import template_schema @@ -622,7 +622,7 @@ def test_get_template_reply_to(client, sample_letter_template): json_resp = json.loads(resp.get_data(as_text=True)) assert 'service_letter_contact_id' not in json_resp['data'] - assert json_resp['data']['reply_to'] == str(letter_contact.id) + assert json_resp['data']['reply_to'] == letter_contact.contact_block def test_update_template_reply_to(client, sample_letter_template):