Merge "Don't hardcode Python versions in test"

This commit is contained in:
Zuul
2019-12-12 22:51:57 +00:00
committed by Gerrit Code Review
+1 -2
View File
@@ -14,7 +14,6 @@
import copy
import re
import sys
import fixtures
from jsonschema import exceptions as jsonschema_exc
@@ -444,7 +443,7 @@ class PatternPropertiesTestCase(APIValidationTestCase):
# Note(jrosenboom): This is referencing an internal python error
# string, which is no stable interface. We need a patch in the
# jsonschema library in order to fix this properly.
if sys.version[:3] in ['3.5', '3.6', '3.7']:
if six.PY3:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"