Don't rely on dict ordering in test_plugins_standard
Change-Id: I63b5b2d9dfafe237a9d9111f231adb42c2b231d3
This commit is contained in:
parent
fee35efed9
commit
bef76170cb
@ -183,8 +183,9 @@ class TestValidateInterfacesHook(test_base.NodeTest):
|
|||||||
self.hook.before_processing(self.data)
|
self.hook.before_processing(self.data)
|
||||||
|
|
||||||
self.assertEqual(self.active_interfaces, self.data['interfaces'])
|
self.assertEqual(self.active_interfaces, self.data['interfaces'])
|
||||||
self.assertEqual([i['mac'] for i in self.active_interfaces.values()],
|
self.assertEqual(sorted(i['mac'] for i in
|
||||||
self.data['macs'])
|
self.active_interfaces.values()),
|
||||||
|
sorted(self.data['macs']))
|
||||||
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
||||||
|
|
||||||
def test_only_active(self):
|
def test_only_active(self):
|
||||||
@ -192,8 +193,9 @@ class TestValidateInterfacesHook(test_base.NodeTest):
|
|||||||
self.hook.before_processing(self.data)
|
self.hook.before_processing(self.data)
|
||||||
|
|
||||||
self.assertEqual(self.active_interfaces, self.data['interfaces'])
|
self.assertEqual(self.active_interfaces, self.data['interfaces'])
|
||||||
self.assertEqual([i['mac'] for i in self.active_interfaces.values()],
|
self.assertEqual(sorted(i['mac'] for i in
|
||||||
self.data['macs'])
|
self.active_interfaces.values()),
|
||||||
|
sorted(self.data['macs']))
|
||||||
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
||||||
|
|
||||||
def test_all(self):
|
def test_all(self):
|
||||||
@ -201,8 +203,9 @@ class TestValidateInterfacesHook(test_base.NodeTest):
|
|||||||
self.hook.before_processing(self.data)
|
self.hook.before_processing(self.data)
|
||||||
|
|
||||||
self.assertEqual(self.orig_interfaces, self.data['interfaces'])
|
self.assertEqual(self.orig_interfaces, self.data['interfaces'])
|
||||||
self.assertEqual([i['mac'] for i in self.orig_interfaces.values()],
|
self.assertEqual(sorted(i['mac'] for i in
|
||||||
self.data['macs'])
|
self.orig_interfaces.values()),
|
||||||
|
sorted(self.data['macs']))
|
||||||
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
self.assertEqual(self.orig_interfaces, self.data['all_interfaces'])
|
||||||
|
|
||||||
@mock.patch.object(node_cache.NodeInfo, 'delete_port', autospec=True)
|
@mock.patch.object(node_cache.NodeInfo, 'delete_port', autospec=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user