Merge "linuxbridge UT: Do not create the same instance in each cases"

This commit is contained in:
Jenkins 2015-03-12 02:13:07 +00:00 committed by Gerrit Code Review
commit b97b3c1b6f
1 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ class TestLinuxBridgeAgent(base.BaseTestCase):
0)
def test_treat_devices_removed_with_existed_device(self):
agent = linuxbridge_neutron_agent.LinuxBridgeNeutronAgentRPC({}, 0)
agent = self.agent
devices = [DEVICE_1]
with contextlib.nested(
mock.patch.object(agent.plugin_rpc, "update_device_down"),
@ -125,7 +125,7 @@ class TestLinuxBridgeAgent(base.BaseTestCase):
self.assertTrue(fn_rdf.called)
def test_treat_devices_removed_with_not_existed_device(self):
agent = linuxbridge_neutron_agent.LinuxBridgeNeutronAgentRPC({}, 0)
agent = self.agent
devices = [DEVICE_1]
with contextlib.nested(
mock.patch.object(agent.plugin_rpc, "update_device_down"),
@ -142,7 +142,7 @@ class TestLinuxBridgeAgent(base.BaseTestCase):
self.assertTrue(fn_rdf.called)
def test_treat_devices_removed_failed(self):
agent = linuxbridge_neutron_agent.LinuxBridgeNeutronAgentRPC({}, 0)
agent = self.agent
devices = [DEVICE_1]
with contextlib.nested(
mock.patch.object(agent.plugin_rpc, "update_device_down"),