From 8e7f2615a99bbae014ef9f53cf24560c4f5d2842 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 13 May 2022 09:09:14 +0100 Subject: [PATCH] Fix test assertion This test was calling `.load` on model objects, when it should have been calling `.dump`. This was not working as expected before the marshmallow upgrade either - the objects returned were errors and not template versions. --- tests/app/dao/test_templates_dao.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/app/dao/test_templates_dao.py b/tests/app/dao/test_templates_dao.py index 56a93c455..a02fee373 100644 --- a/tests/app/dao/test_templates_dao.py +++ b/tests/app/dao/test_templates_dao.py @@ -438,8 +438,9 @@ def test_get_template_versions(sample_template): assert versions[1].updated_at is not None from app.schemas import template_history_schema - v = template_history_schema.load(versions, many=True) + v = template_history_schema.dump(versions, many=True) assert len(v) == 2 + assert {template_history['version'] for template_history in v} == {1, 2} def test_get_template_versions_is_empty_for_hidden_templates(sample_service):