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