def test_error_response_multi_repr(self): value = api.APIError({ 'credentials': ['no api token'], 'request': ['malformed request'] }) expectation = '<APIError [credentials, request]>' self.assertEqual(repr(value), expectation)
def test_error_response_multi_str(self): value = api.APIError({ 'credentials': ['no api token'], 'request': ['malformed request'] }) expectation = ('[credentials]: [\'no api token\'], ' '[request]: [\'malformed request\']') self.assertEqual(str(value), expectation)
def test_error_response_str(self): value = api.APIError({'credentials': ['no api token']}) expectation = '[credentials]: [\'no api token\']' self.assertEqual(str(value), expectation)
def test_error_response_repr(self): value = api.APIError({'credentials': ['no api token']}) expectation = '<APIError [credentials]>' self.assertEqual(repr(value), expectation)