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.
This commit is contained in:
Katie Smith
2022-05-13 09:09:14 +01:00
parent 21c943484d
commit 8e7f2615a9

View File

@@ -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):