예제 #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'
예제 #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'
예제 #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')))
예제 #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')))