def test_json_wrap_exception(self): """Raises a generalized exception for failed 200s""" # This is not JSON self.result.content = '{"' self.assertRaises(http.ClientException, http.json_wrap(self.function))
def test_json_wrap_exception(self): '''Raises a generalized exception for failed 200s''' # This is not JSON self.result.content = '{"' self.assertRaises(http.ClientException, http.json_wrap(self.function))
def test_json_wrap_basic(self): """Returns JSON-parsed content""" self.result.content = '{"data":"bar"}' self.assertEqual(http.json_wrap(self.function)(), "bar")
def test_json_wrap_basic(self): '''Returns JSON-parsed content''' self.result.content = '{"data":"bar"}' self.assertEqual(http.json_wrap(self.function)(), 'bar')