Browse Source

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>
Chuck Short 8 months ago
parent
commit
3f665f3309
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      karbor/tests/unit/api/test_api_validation.py

+ 1
- 2
karbor/tests/unit/api/test_api_validation.py View File

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

Loading…
Cancel
Save