py36: Fix unit tests

Unit tests were only working on py35 and not py36, this is because
the unit test in test_api_validations were only checking for
py35. Use the six library to detect the python version used.

Change-Id: Iab10228e911a9efc0e18b04667596342ee949642
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-24 08:05:59 -04:00 committed by Nguyen Hai
parent 695d6726f8
commit 3f665f3309

View File

@ -11,7 +11,6 @@
# under the License.
import re
import sys
import fixtures
import six
@ -234,7 +233,7 @@ class PatternPropertiesTestCase(APIValidationTestCase):
self.check_validation_error(self.post, body={'0123456789a': 'bar'},
expected_detail=details)
if sys.version[:3] == '3.5':
if six.PY3:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"