mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user