Skip to content

Commit

Permalink
Fix flaky organization model test
Browse files Browse the repository at this point in the history
Compare sets instead of list to avoid any issues around ordering.
  • Loading branch information
marcospri committed Jul 26, 2024
1 parent 2531350 commit 5686550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/lms/models/organization_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def test_application_instance_relationship(
):
db_session.flush()

assert organization.application_instances == application_instances
by_id = lambda x: x.id
assert sorted(organization.application_instances, key=by_id) == sorted(
application_instances, key=by_id
)
for application_instance in application_instances:
assert application_instance.organization == organization

Expand Down

0 comments on commit 5686550

Please sign in to comment.