From 78700ba70620f7b53b5ae71332cca853f5afa467 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Thu, 25 Jun 2015 22:08:41 -0700 Subject: [PATCH] Remove duplicated mock patch of ip_lib The functional tests for agents were patching ip_lib in the function to configure an agent, so any tests that relied on multiple agents would patch ip_lib multiple times. Partial-Bug: #1468998 Change-Id: Ibccf586dea870ec222369c0876f17f8eaf9a1aca --- neutron/tests/functional/agent/test_l3_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/tests/functional/agent/test_l3_agent.py b/neutron/tests/functional/agent/test_l3_agent.py index 8631e9d27..74d2e486f 100644 --- a/neutron/tests/functional/agent/test_l3_agent.py +++ b/neutron/tests/functional/agent/test_l3_agent.py @@ -68,6 +68,7 @@ class L3AgentTestFramework(base.BaseSudoTestCase): self.mock_plugin_api = mock.patch( 'neutron.agent.l3.agent.L3PluginApi').start().return_value mock.patch('neutron.agent.rpc.PluginReportStateAPI').start() + mock.patch.object(ip_lib, '_arping').start() self.agent = self._configure_agent('agent1') def _get_config_opts(self): @@ -104,7 +105,6 @@ class L3AgentTestFramework(base.BaseSudoTestCase): get_temp_file_path('external/pids')) conf.set_override('host', host) agent = neutron_l3_agent.L3NATAgentWithStateReport(host, conf) - mock.patch.object(ip_lib, '_arping').start() return agent -- 2.45.2