예제 #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')
예제 #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",
         )
예제 #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')