mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-19 09:01:54 -05:00
Fix failing test
This was passing locally, but failing on Concourse due to a different order of TemplateHistory items being returned. This changes the test so that it can't randomly fail based on the order of template history items returned.
This commit is contained in:
@@ -377,12 +377,10 @@ def test_update_should_update_a_template(client, sample_user):
|
||||
assert update_json_resp['data']['version'] == 2
|
||||
|
||||
assert update_json_resp['data']['created_by'] == str(sample_user.id)
|
||||
assert [
|
||||
template.created_by_id for template in TemplateHistory.query.all()
|
||||
] == [
|
||||
service.created_by.id,
|
||||
sample_user.id,
|
||||
]
|
||||
template_created_by_users = [template.created_by_id for template in TemplateHistory.query.all()]
|
||||
assert len(template_created_by_users) == 2
|
||||
assert service.created_by.id in template_created_by_users
|
||||
assert sample_user.id in template_created_by_users
|
||||
|
||||
|
||||
def test_should_be_able_to_archive_template(client, sample_template):
|
||||
|
||||
Reference in New Issue
Block a user