Exemple #1
0
 def test_get_rules(self):
     '''
     Test if it return a data structure of the current, in-memory rules
     '''
     mock = MagicMock(return_value=False)
     with patch.object(iptables, '_parse_conf', mock):
         self.assertFalse(iptables.get_rules())
         mock.assert_called_with(in_mem=True, family='ipv4')
Exemple #2
0
 def test_get_rules(self):
     '''
     Test if it return a data structure of the current, in-memory rules
     '''
     mock = MagicMock(return_value=False)
     with patch.object(iptables, '_parse_conf', mock):
         self.assertFalse(iptables.get_rules())
         mock.assert_called_with(in_mem=True, family='ipv4')
Exemple #3
0
 def test_get_rules(self):
     '''
     Test if it return a data structure of the current, in-memory rules
     '''
     self.assertFalse(iptables.get_rules())
Exemple #4
0
 def test_get_rules(self):
     '''
     Test if it return a data structure of the current, in-memory rules
     '''
     self.assertFalse(iptables.get_rules())