rename template.serialize to serialize_for_v2

make it clear that this is for the public api, and we shouldn't add
fields to it without considering impacts

also add the broadcast_messages relationship on service and template to
the exclude from the marshmallow schemas, so it's not included elsewhere
This commit is contained in:
Leo Hemsted
2020-07-06 16:41:53 +01:00
parent 5f337f7914
commit 0282a76bf7
7 changed files with 10 additions and 10 deletions

View File

@@ -44,7 +44,6 @@ def test_get_template_by_id_returns_200(
'name': expected_name,
'personalisation': {},
'postage': postage,
'broadcast_data': None,
}
assert json_response == expected_response

View File

@@ -2,7 +2,7 @@ import pytest
from flask import json
from app.models import EMAIL_TYPE, LETTER_TYPE, SMS_TYPE, TEMPLATE_TYPES
from app.models import EMAIL_TYPE, LETTER_TYPE, TEMPLATE_TYPES
from tests import create_authorization_header
from tests.app.db import create_template