This isn't functionally different[1] from the previous use of set(),
but it makes the error output easier to read.
[1] OK, it will also show duplicates, which we really don't expect and
would definitely want to see.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
controls=controls)
return res
- def assert_links(self, obj, expected, attr, sorted=False, msg='',
- **kwargs):
+ def assert_links(self, obj, expected, attr, msg='', **kwargs):
res = self.attr_search(obj, expected, attr, **kwargs)
if len(expected) == 0:
except KeyError:
self.fail("missing attr '%s' on %s" % (attr, obj))
- if sorted == False:
- results = set(results)
- expected = set(expected)
+ expected = sorted(expected)
+ results = sorted(results)
if expected != results:
print msg