Tests: Fix python version check
This version check assumes that there will
never be a version of Python 3 after 3.5...
Related-Bug:
@@ -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"
