yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #53062
[Bug 1598062] [NEW] Unit test fails on python3.5
Public bug reported:
This is similar to https://launchpad.net/bugs/1559191 but in this case
it looks like the embedded error message comes from the jsonschema
library:
==============================
Failed 1 tests - output below:
==============================
nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
---------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/api/validation/validators.py", line 258, in validate'
b' self.validator.validate(*args, **kwargs)'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/validators.py", line 122, in validate'
b' for error in self.iter_errors(*args, **kwargs):'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/validators.py", line 98, in iter_errors'
b' for error in errors:'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/_validators.py", line 25, in additionalProperties'
b' extras = set(_utils.find_additional_properties(instance, schema))'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/_utils.py", line 100, in find_additional_properties'
b' if patterns and re.search(patterns, property):'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/re.py", line 173, in search'
b' return _compile(pattern, flags).search(string)'
b'TypeError: expected string or bytes-like object'
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 101, in check_validation_error'
b' method(body=body, req=req,)'
b' File "/home/ubuntu/src/nova/nova/api/validation/__init__.py", line 71, in wrapper'
b" schema_validator.validate(kwargs['body'])"
b' File "/home/ubuntu/src/nova/nova/api/validation/validators.py", line 277, in validate'
b' raise exception.ValidationError(detail=detail)'
b'nova.exception.ValidationError: expected string or bytes-like object'
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 359, in test_validate_patternProperties_fails'
b' expected_detail=detail)'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 106, in check_validation_error'
b" 'Exception details did not match expected')"
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 411, in assertEqual'
b' self.assertThat(observed, matcher, message)'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat'
b' raise mismatch_error'
b"testtools.matchers._impl.MismatchError: 'expected string or buffer' != 'expected string or bytes-like object': Exception details did not match expected"
b''
** Affects: nova
Importance: Undecided
Assignee: Dr. Jens Rosenboom (j-rosenboom-j)
Status: New
** Changed in: nova
Assignee: (unassigned) => Dr. Jens Rosenboom (j-rosenboom-j)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1598062
Title:
Unit test fails on python3.5
Status in OpenStack Compute (nova):
New
Bug description:
This is similar to https://launchpad.net/bugs/1559191 but in this case
it looks like the embedded error message comes from the jsonschema
library:
==============================
Failed 1 tests - output below:
==============================
nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
---------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/api/validation/validators.py", line 258, in validate'
b' self.validator.validate(*args, **kwargs)'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/validators.py", line 122, in validate'
b' for error in self.iter_errors(*args, **kwargs):'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/validators.py", line 98, in iter_errors'
b' for error in errors:'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/_validators.py", line 25, in additionalProperties'
b' extras = set(_utils.find_additional_properties(instance, schema))'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/jsonschema/_utils.py", line 100, in find_additional_properties'
b' if patterns and re.search(patterns, property):'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/re.py", line 173, in search'
b' return _compile(pattern, flags).search(string)'
b'TypeError: expected string or bytes-like object'
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 101, in check_validation_error'
b' method(body=body, req=req,)'
b' File "/home/ubuntu/src/nova/nova/api/validation/__init__.py", line 71, in wrapper'
b" schema_validator.validate(kwargs['body'])"
b' File "/home/ubuntu/src/nova/nova/api/validation/validators.py", line 277, in validate'
b' raise exception.ValidationError(detail=detail)'
b'nova.exception.ValidationError: expected string or bytes-like object'
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 359, in test_validate_patternProperties_fails'
b' expected_detail=detail)'
b' File "/home/ubuntu/src/nova/nova/tests/unit/test_api_validation.py", line 106, in check_validation_error'
b" 'Exception details did not match expected')"
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 411, in assertEqual'
b' self.assertThat(observed, matcher, message)'
b' File "/home/ubuntu/src/nova/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 498, in assertThat'
b' raise mismatch_error'
b"testtools.matchers._impl.MismatchError: 'expected string or buffer' != 'expected string or bytes-like object': Exception details did not match expected"
b''
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1598062/+subscriptions
Follow ups