def test_delete_zone(self): ''' Test for Delete an existing zone ''' with patch.object(firewalld, '__mgmt', return_value='success'): with patch.object(firewalld, '__firewall_cmd', return_value='A'): self.assertEqual(firewalld.delete_zone('zone'), 'A') with patch.object(firewalld, '__mgmt', return_value='A'): self.assertEqual(firewalld.delete_zone('zone'), 'A') mock = MagicMock(return_value='A') with patch.object(firewalld, '__mgmt', return_value='A'): self.assertEqual(firewalld.delete_zone('zone', False), 'A')
def test_delete_zone(self): """ Test for Delete an existing zone """ with patch.object(firewalld, "__mgmt", return_value="success"): with patch.object(firewalld, "__firewall_cmd", return_value="A"): self.assertEqual(firewalld.delete_zone("zone"), "A") with patch.object(firewalld, "__mgmt", return_value="A"): self.assertEqual(firewalld.delete_zone("zone"), "A") mock = MagicMock(return_value="A") with patch.object(firewalld, "__mgmt", return_value="A"): self.assertEqual(firewalld.delete_zone("zone", False), "A")
def test_delete_zone(self): ''' Test for Delete an existing zone ''' with patch.object(firewalld, '__mgmt', return_value='success'): with patch.object(firewalld, '__firewall_cmd', return_value='A'): self.assertEqual(firewalld.delete_zone('zone'), 'A') with patch.object(firewalld, '__mgmt', return_value='A'): self.assertEqual(firewalld.delete_zone('zone'), 'A') mock = MagicMock(return_value='A') with patch.object(firewalld, '__mgmt', return_value='A'): self.assertEqual(firewalld.delete_zone('zone', False), 'A')