Replace how .dump is called

As with `.load`, only data is now returned instead of a tuple.
This commit is contained in:
Katie Smith
2022-05-06 15:52:44 +01:00
parent bd4f74b359
commit 8ae2b0bb31
13 changed files with 65 additions and 66 deletions

View File

@@ -88,7 +88,7 @@ def test_should_create_a_new_template_for_a_service(
template = Template.query.get(json_resp['data']['id'])
from app.schemas import template_schema
assert sorted(json_resp['data']) == sorted(template_schema.dump(template).data)
assert sorted(json_resp['data']) == sorted(template_schema.dump(template))
def test_create_a_new_template_for_a_service_adds_folder_relationship(
@@ -879,7 +879,7 @@ def test_create_a_template_with_reply_to(admin_request, sample_user):
template = Template.query.get(json_resp['data']['id'])
from app.schemas import template_schema
assert sorted(json_resp['data']) == sorted(template_schema.dump(template).data)
assert sorted(json_resp['data']) == sorted(template_schema.dump(template))
th = TemplateHistory.query.filter_by(id=template.id, version=1).one()
assert th.service_letter_contact_id == letter_contact.id