How to use the pdpyras.raise_on_error function in pdpyras

To help you get started, we’ve selected a few pdpyras examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PagerDuty / pdpyras / test_pdpyras.py View on Github external
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)
github PagerDuty / pdpyras / test_pdpyras.py View on Github external
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)