Fix PatternPropertiesTestCase for py 3.6

A python version check was only checking for 3.5. As noted
in the pre-existing comment, an exception message is not a
particularly stable interface so specific-to-minor-version
check is maintained.

Change-Id: I441b90e911fbac033e8cdea96114db22cba96ac5
Closes-Bug: #1750355
This commit is contained in:
Chris Dent 2018-02-19 11:06:45 +00:00
parent 6d3f4f0521
commit 3017531c82
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,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] == '3.5':
if sys.version[:3] in ['3.5', '3.6']:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"