Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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())
Ejemplo n.º 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())