Test is now also working with Python2

Since assertCountEqual was Python>=3.2 only, we backported this
to Python2.
This commit is contained in:
Jochen Breuer 2018-04-11 10:46:00 +02:00
parent fa9c3c0e7c
commit c22c81304f
No known key found for this signature in database
GPG Key ID: 29ACE79F4D5EEE69

View File

@ -889,4 +889,6 @@ SwapTotal: 4789244 kB'''
ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']}
with patch.object(socket, 'gethostbyaddr', side_effect=reverse_resolv_mock):
fqdns = core.fqdns()
self.assertCountEqual(fqdns['fqdns'], ret['fqdns'])
self.assertIn('fqdns', fqdns)
self.assertEqual(len(fqdns['fqdns']), len(ret['fqdns']))
self.assertEqual(set(fqdns['fqdns']), set(ret['fqdns']))