Skip to content

Commit

Permalink
tests: Fix `/status' endpoint to cater for lists
Browse files Browse the repository at this point in the history
We can now get list objects from the /status endpoint in the case of
having different versions of the same language module.

That led to this error

  >       return d1 - d2
  E       TypeError: unsupported operand type(s) for -: 'list' and 'list'

We already cover a similar case for when we have simple strings so add
this to that.

Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Aug 28, 2024
1 parent 0951778 commit f4298f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def find_diffs(d1, d2):
if k in d2
}

if isinstance(d1, str):
if isinstance(d1, str) or isinstance(d1, list):
return d1 == d2

return d1 - d2
Expand Down

0 comments on commit f4298f9

Please sign in to comment.