def test_update_port_filter_port_security_disabled(self):
    port_dict = {'device': 'port-id', 'security_groups': [1]}
    self._prepare_security_group()
    self.firewall.prepare_port_filter(port_dict)
    port_dict['port_security_enabled'] = False
    self.firewall.update_port_filter(port_dict)
    self.assertTrue(self.mock_bridge.br.delete_flows.called)
def test_update_port_filter_port_security_disabled(self):
    port_dict = {'device': 'port-id', 'security_groups': [1]}
    self._prepare_security_group()
    self.firewall.prepare_port_filter(port_dict)
    port_dict['port_security_enabled'] = False
    self.firewall.update_port_filter(port_dict)
    self.assertTrue(self.mock_bridge.br.delete_flows.called)