Skip to content

Commit

Permalink
Merge pull request #343 from evrimoztamur/main
Browse files Browse the repository at this point in the history
Fix superfluous JSON/XML tagging in PaymentManager
  • Loading branch information
freakboy3742 authored Sep 27, 2023
2 parents f438109 + 23d90e8 commit b64cea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/xero/paymentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions tests/test_paymentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def test_delete(self):

self.assertEqual(params, {})
self.assertEqual(method, "post")
self.assertIn("xml", body)

assertXMLEqual(self, body["xml"], "<Status>DELETED</Status>")
assertXMLEqual(self, body, "<Status>DELETED</Status>")

self.assertIsNone(headers)

0 comments on commit b64cea0

Please sign in to comment.