Exemple #1
0
 def test_add_port(self):
     '''
     Test adding a port to a specific zone
     '''
     with patch.object(firewalld, '__firewall_cmd', return_value='success'):
         self.assertEqual(firewalld.add_port('zone', '80/tcp'), 'success')
Exemple #2
0
 def test_add_port(self):
     """
     Test adding a port to a specific zone
     """
     with patch.object(firewalld, "__firewall_cmd", return_value="success"):
         self.assertEqual(firewalld.add_port("zone", "80/tcp"), "success")
Exemple #3
0
 def test_add_port(self):
     '''
     Test adding a port to a specific zone
     '''
     with patch.object(firewalld, '__firewall_cmd', return_value='success'):
         self.assertEqual(firewalld.add_port('zone', '80/tcp'), 'success')