Exemple #1
0
 def test__should_enable_dhcp_false(self):
     self.mock_introspection_active.return_value = False
     self.assertIs(False, iptables._should_enable_dhcp())
Exemple #2
0
 def test_node_not_found_hook_set(self):
     # DHCP should be always opened if node_not_found hook is set
     CONF.set_override('node_not_found_hook', 'enroll', 'processing')
     self.mock_introspection_active.return_value = False
     self.assertIs(True, iptables._should_enable_dhcp())
Exemple #3
0
 def test_introspection_active(self):
     self.mock_introspection_active.return_value = True
     self.assertIs(True, iptables._should_enable_dhcp())
 def test__should_enable_dhcp_false(self):
     self.mock_introspection_active.return_value = False
     self.assertIs(False, iptables._should_enable_dhcp())
 def test_node_not_found_hook_set(self):
     # DHCP should be always opened if node_not_found hook is set
     CONF.set_override('node_not_found_hook', 'enroll', 'processing')
     self.mock_introspection_active.return_value = False
     self.assertIs(True, iptables._should_enable_dhcp())
 def test_introspection_active(self):
     self.mock_introspection_active.return_value = True
     self.assertIs(True, iptables._should_enable_dhcp())