コード例 #1
0
ファイル: test_firewalld.py プロジェクト: MalloZup/salt-2
 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
ファイル: firewalld_test.py プロジェクト: bryson/salt
 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')