Merge "Remove references to 'sys.version_info'"

This commit is contained in:
Zuul 2021-05-27 17:10:39 +00:00 committed by Gerrit Code Review
commit 39762e408e

View File

@ -15,7 +15,6 @@
from http import client as http from http import client as http
import re import re
import sys
import fixtures import fixtures
@ -238,11 +237,7 @@ class PatternPropertiesTestCase(APIValidationTestCase):
self.check_validation_error(self.post, body={'0123456789a': 'bar'}, self.check_validation_error(self.post, body={'0123456789a': 'bar'},
expected_detail=details) expected_detail=details)
ver_info = sys.version_info detail = "expected string or bytes-like object"
if ver_info.major == 3 and ver_info.minor >= 5:
detail = "expected string or bytes-like object"
else:
detail = "expected string or buffer"
self.check_validation_error(self.post, body={None: 'bar'}, self.check_validation_error(self.post, body={None: 'bar'},
expected_detail=detail) expected_detail=detail)