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

pull/3117/head
sebres 2021-03-22 00:55:28 +01:00
parent a45b1c974c
commit e587526ede
1 changed files with 1 additions and 0 deletions

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))