Merge "Remove faulty .assert_has_calls([])"

This commit is contained in:
Jenkins 2014-09-15 16:53:20 +00:00 committed by Gerrit Code Review
commit c08ada02d7
4 changed files with 7 additions and 7 deletions

View File

@ -174,7 +174,7 @@ class TestLoadBalancerPlugin(TestLoadBalancerPluginBase):
'tenant_id', 'port_name',
'network_id', '10.10.10.10')
self.plugin_instance._core_plugin.get_ports.assert_called_once()
self.plugin_instance._core_plugin.create_port.assert_has_calls([])
self.assertFalse(self.plugin_instance._core_plugin.create_port.called)
def test_rest_client_recover_was_called(self):
"""Call the real REST client and verify _recover is called."""

View File

@ -1028,7 +1028,7 @@ class IptablesFirewallTestCase(BaseIptablesFirewallTestCase):
port = self._fake_port()
self.firewall.remove_port_filter(port)
# checking no exception occures
self.v4filter_inst.assert_has_calls([])
self.assertFalse(self.v4filter_inst.called)
def test_defer_apply(self):
with self.firewall.defer_apply():

View File

@ -394,7 +394,7 @@ class TestBridgeInterfaceDriver(TestBase):
'port-1234',
'tap0',
'aa:bb:cc:dd:ee:ff')
self.ip_dev.assert_has_calls([])
self.assertFalse(self.ip_dev.called)
self.assertEqual(log.call_count, 1)
def test_plug_mtu(self):

View File

@ -1000,7 +1000,7 @@ class SecurityGroupAgentRpcTestCase(BaseSecurityGroupAgentRpcTestCase):
self.agent.refresh_firewall = mock.Mock()
self.agent.prepare_devices_filter(['fake_port_id'])
self.agent.security_groups_rule_updated(['fake_sgid3', 'fake_sgid4'])
self.agent.refresh_firewall.assert_has_calls([])
self.assertFalse(self.agent.refresh_firewall.called)
def test_security_groups_member_updated(self):
self.agent.refresh_firewall = mock.Mock()
@ -1013,7 +1013,7 @@ class SecurityGroupAgentRpcTestCase(BaseSecurityGroupAgentRpcTestCase):
self.agent.refresh_firewall = mock.Mock()
self.agent.prepare_devices_filter(['fake_port_id'])
self.agent.security_groups_member_updated(['fake_sgid3', 'fake_sgid4'])
self.agent.refresh_firewall.assert_has_calls([])
self.assertFalse(self.agent.refresh_firewall.called)
def test_security_groups_provider_updated(self):
self.agent.refresh_firewall = mock.Mock()
@ -1041,7 +1041,7 @@ class SecurityGroupAgentRpcTestCase(BaseSecurityGroupAgentRpcTestCase):
def test_refresh_firewall_none(self):
self.agent.refresh_firewall([])
self.firewall.assert_has_calls([])
self.assertFalse(self.firewall.called)
class SecurityGroupAgentEnhancedRpcTestCase(
@ -1157,7 +1157,7 @@ class SecurityGroupAgentEnhancedRpcTestCase(
def test_refresh_firewall_none_enhanced_rpc(self):
self.agent.refresh_firewall([])
self.firewall.assert_has_calls([])
self.assertFalse(self.firewall.called)
class SecurityGroupAgentRpcWithDeferredRefreshTestCase(