Merge "Tests: Fix python version check"

This commit is contained in:
Zuul 2018-02-16 23:44:21 +00:00 committed by Gerrit Code Review
commit 1ce09013ff

View File

@ -239,7 +239,8 @@ class PatternPropertiesTestCase(APIValidationTestCase):
self.check_validation_error(self.post, body={'0123456789a': 'bar'},
expected_detail=details)
if sys.version[:3] == '3.5':
ver_info = sys.version_info
if ver_info.major == 3 and ver_info.minor >= 5:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"