Fix invalid mock name in test_ovs_neutron_agent

The test_ovs_neutron_agent mocks on reset_tunnel_br while the patch [1]
renamed this method to setup_tunnel_br.

[1] https://review.openstack.org/#/c/182920/

Closes-Bug: 1563233
Change-Id: I273f05f441f72863077e639775a9483c20a9cc5f
This commit is contained in:
Hynek Mlnarik 2016-03-29 11:09:14 +02:00
parent f0f1d1b525
commit a5822ca0d0
1 changed files with 9 additions and 11 deletions

View File

@ -2956,12 +2956,11 @@ class TestOvsDvrNeutronAgent(object):
mock.patch.object(self.agent,
'_agent_has_updates',
side_effect=TypeError('loop exit')),\
mock.patch.object(self.agent, 'tun_br', new=tun_br):
# block RPC calls and bridge calls
self.agent.setup_physical_bridges = mock.Mock()
self.agent.setup_integration_br = mock.Mock()
self.agent.setup_tunnel_br = mock.Mock()
self.agent.state_rpc = mock.Mock()
mock.patch.object(self.agent, 'tun_br', new=tun_br),\
mock.patch.object(self.agent, 'setup_physical_bridges'),\
mock.patch.object(self.agent, 'setup_integration_br'),\
mock.patch.object(self.agent, 'setup_tunnel_br'),\
mock.patch.object(self.agent, 'state_rpc'):
try:
self.agent.rpc_loop(polling_manager=mock.Mock())
except TypeError:
@ -2977,12 +2976,11 @@ class TestOvsDvrNeutronAgent(object):
mock.patch.object(self.agent, '_agent_has_updates',
return_value=True),\
mock.patch.object(self.agent, '_check_and_handle_signal',
side_effect=[True, False]):
side_effect=[True, False]),\
mock.patch.object(self.agent, 'setup_physical_bridges'),\
mock.patch.object(self.agent, 'setup_integration_br'),\
mock.patch.object(self.agent, 'state_rpc'):
# block RPC calls and bridge calls
self.agent.setup_physical_bridges = mock.Mock()
self.agent.setup_integration_br = mock.Mock()
self.agent.reset_tunnel_br = mock.Mock()
self.agent.state_rpc = mock.Mock()
self.agent.rpc_loop(polling_manager=mock.Mock())
def test_scan_ports_failure(self):