tests: add missing constraint (causing incomplete comparison in below cycle if fewer lines as expected was found)

This commit is contained in:
sebres 2021-03-22 00:55:28 +01:00
parent a45b1c974c
commit e587526ede

View file

@ -188,6 +188,7 @@ def _assert_correct_last_attempt(utest, filter_, output, count=None):
utest.assertEqual(len(found), 1)
_assert_equal_entries(utest, found[0], output, count)
else:
utest.assertEqual(len(found), len(output))
# sort by string representation of ip (multiple failures with different ips):
found = sorted(found, key=lambda x: str(x))
output = sorted(output, key=lambda x: str(x))