From ce465cb62ec9d4933045aa7176d11be6eacf7288 Mon Sep 17 00:00:00 2001 From: Yandong Xuan Date: Sun, 25 Apr 2021 14:19:19 +0800 Subject: [PATCH] Remove references to 'sys.version_info' We support Python 3.6 as a minimum now, making these checks no-ops. Change-Id: Iee9fa15ae54e359b336afa565c1cf3bece29ab2c --- cinder/tests/unit/api/test_api_validation.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cinder/tests/unit/api/test_api_validation.py b/cinder/tests/unit/api/test_api_validation.py index 2d41b1ae867..a2c03833edd 100644 --- a/cinder/tests/unit/api/test_api_validation.py +++ b/cinder/tests/unit/api/test_api_validation.py @@ -15,7 +15,6 @@ from http import client as http import re -import sys import fixtures @@ -238,11 +237,7 @@ class PatternPropertiesTestCase(APIValidationTestCase): self.check_validation_error(self.post, body={'0123456789a': 'bar'}, expected_detail=details) - 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" + detail = "expected string or bytes-like object" self.check_validation_error(self.post, body={None: 'bar'}, expected_detail=detail)