Fix mock order
As per [1], the order of the created mocks passed into test function must matches the decorators apply order(from the bottom upwards). [1] http://www.voidspace.org.uk/python/mock/patch.html#nesting-patch-decorators Change-Id: I139f78f25c32cf82c9d4b4d4d3a2852a23fab89c
This commit is contained in:
parent
bd84c9f281
commit
efe0078d36
|
@ -34,7 +34,7 @@ class BindingTest(base.TestCase):
|
|||
return_value=mock_create)
|
||||
@mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getitem__',
|
||||
return_value=mock_interface)
|
||||
def test_port_bind(self, mock_getattribute, mock_getitem,
|
||||
def test_port_bind(self, mock_getitem, mock_getattribute,
|
||||
mock_execute, mock_path_exists):
|
||||
fake_mtu = 1450
|
||||
fake_docker_network_id = utils.get_hash()
|
||||
|
|
Loading…
Reference in New Issue