'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."""
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():
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()
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()
def test_refresh_firewall_none(self):
self.agent.refresh_firewall([])
- self.firewall.assert_has_calls([])
+ self.assertFalse(self.firewall.called)
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(