diff --git a/test_elasticsearch/test_server/test_common.py b/test_elasticsearch/test_server/test_common.py index 2df5cf22..d9742c82 100644 --- a/test_elasticsearch/test_server/test_common.py +++ b/test_elasticsearch/test_server/test_common.py @@ -168,7 +168,7 @@ class YamlTestCase(ElasticsearchTestCase): if catch in CATCH_CODES: self.assertEquals(CATCH_CODES[catch], exception.status_code) elif catch[0] == '/' and catch[-1] == '/': - self.assertTrue(re.search(catch[1:-1], repr(exception.info)), '%s not in %r' % (catch, exception.info)) + self.assertTrue(re.search(catch[1:-1], exception.error + ' ' + repr(exception.info)), '%s not in %r' % (catch, exception.info)) self.last_response = exception.info def run_gt(self, action):