Exemplo n.º 1
0
 def test_add_rich_rule(self):
     '''
     Test adding a rich rule to a zone
     '''
     with patch.object(firewalld, '__firewall_cmd', return_value='success'):
         self.assertEqual(
             firewalld.add_rich_rule(
                 'zone',
                 'rule family="ipv4" source address="1.2.3.4" accept'),
             'success')
Exemplo n.º 2
0
 def test_add_rich_rule(self):
     """
     Test adding a rich rule to a zone
     """
     with patch.object(firewalld, "__firewall_cmd", return_value="success"):
         self.assertEqual(
             firewalld.add_rich_rule(
                 "zone",
                 'rule family="ipv4" source address="1.2.3.4" accept'),
             "success",
         )
Exemplo n.º 3
0
 def test_add_rich_rule(self):
     '''
     Test adding a rich rule to a zone
     '''
     with patch.object(firewalld, '__firewall_cmd', return_value='success'):
         self.assertEqual(firewalld.add_rich_rule('zone', 'rule family="ipv4" source address="1.2.3.4" accept'), 'success')