diff --git a/src/xero/paymentmanager.py b/src/xero/paymentmanager.py index 3860e5b..e4a68a8 100644 --- a/src/xero/paymentmanager.py +++ b/src/xero/paymentmanager.py @@ -21,5 +21,5 @@ def __init__(self, name, credentials, unit_price_4dps=False, user_agent=None): def _delete(self, id): uri = "/".join([self.base_url, self.name, id]) data = {"Status": "DELETED"} - body = {"xml": self._prepare_data_for_save(data)} + body = self._prepare_data_for_save(data) return uri, {}, "post", body, None, False diff --git a/tests/test_paymentmanager.py b/tests/test_paymentmanager.py index 5b8f53f..f17edd0 100644 --- a/tests/test_paymentmanager.py +++ b/tests/test_paymentmanager.py @@ -21,8 +21,7 @@ def test_delete(self): self.assertEqual(params, {}) self.assertEqual(method, "post") - self.assertIn("xml", body) - assertXMLEqual(self, body["xml"], "DELETED") + assertXMLEqual(self, body, "DELETED") self.assertIsNone(headers)