Exemplo n.º 1
0
 def actual_exception_cause(self):
     try:
         return content_json(self.actual_response)['reason']
     except ValueError:
         return 'not a json response'
     except KeyError:
         return 'no error reason'
Exemplo n.º 2
0
 def actual_exception_cause(self):
     try:
         return content_json(self.actual_response)['reason']
     except ValueError:
         return 'not a json response'
     except KeyError:
         return 'no error reason'
Exemplo n.º 3
0
 def _get_response_json_content():
     try:
         return content_json(self.actual_response)
     except ValueError:
         testcase.fail(
             'expected a json response, got: "{}"'.format(self.actual_response.content.decode('utf-8')))
Exemplo n.º 4
0
 def _get_response_json_content():
     try:
         return content_json(self.actual_response)
     except ValueError:
         testcase.fail('expected a json response, got: "{}"'.format(
             self.actual_response.content.decode('utf-8')))