def test_prepare_port_filter_port_security_disabled(self):
    port_dict = {'device': 'port-id', 'security_groups': [1], 'port_security_enabled': False}
    self._prepare_security_group()
    with mock.patch.object(self.firewall, 'initialize_port_flows') as m_init_flows:
        self.firewall.prepare_port_filter(port_dict)
    self.assertFalse(m_init_flows.called)
def test_prepare_port_filter_port_security_disabled(self):
    port_dict = {'device': 'port-id', 'security_groups': [1], 'port_security_enabled': False}
    self._prepare_security_group()
    with mock.patch.object(self.firewall, 'initialize_port_flows') as m_init_flows:
        self.firewall.prepare_port_filter(port_dict)
    self.assertFalse(m_init_flows.called)