Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_raise_on_error(self):
self.assertRaises(pdpyras.PDClientError, pdpyras.raise_on_error,
Response(400, json.dumps({})))
try:
pdpyras.raise_on_error(Response(400, json.dumps({})))
except pdpyras.PDClientError as e:
self.assertTrue(e.response is not None)
def test_raise_on_error(self):
self.assertRaises(pdpyras.PDClientError, pdpyras.raise_on_error,
Response(400, json.dumps({})))
try:
pdpyras.raise_on_error(Response(400, json.dumps({})))
except pdpyras.PDClientError as e:
self.assertTrue(e.response is not None)