Use HTTP_SUCCESS for checking success status code
rest_client contains HTTP_SUCCESS already for representing HTTP
success status codes and this patch replaces the status check with
it for the strict validation.
Change-Id: I70371883074addd4c76f08eced16e0b792247a5b
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 88dbe58..b6dc8f9 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -511,7 +511,7 @@
# code if it exists is something that we expect. This is explicitly
# declared in the V3 API and so we should be able to export this in
# the response schema. For now we'll ignore it.
- if str(resp.status).startswith('2'):
+ if resp.status in HTTP_SUCCESS:
response_code = schema['status_code']
if resp.status not in response_code:
msg = ("The status code(%s) is different than the expected "