Skip to content

Commit

Permalink
Fix flakey test
Browse files Browse the repository at this point in the history
This test was fetching an unordered list and comparing it to an ordered list, resulting in inconsistent failures.
  • Loading branch information
jjnesbitt committed Mar 25, 2024
1 parent 271d28a commit 886e297
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dandiapi/api/tests/test_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,4 +1539,5 @@ def test_asset_rest_glob(api_client, asset_factory, version, glob_pattern, expec
{'glob': glob_pattern},
)

assert expected_paths == [asset['path'] for asset in resp.json()['results']]
# Sort both lists before comparing since ordering is not considered
assert sorted(expected_paths) == sorted([asset['path'] for asset in resp.json()['results']])

0 comments on commit 886e297

Please sign in to comment.