← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1855493] [NEW] py38 unit test failure - test_validate_patternProperties_fails

 

Public bug reported:

{0} nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails [0.132395s] ... FAILED
                                                                                                                                                                                                            
Captured traceback:                                                                                   
~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                             b'Traceback (most recent call last):'                                                             
    b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/validators.py", line 280, in validate'                                
    b'    self.validator.validate(*args, **kwargs)'                                                   
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/validators.py", line 352, in validate'         
    b'    for error in self.iter_errors(*args, **kwargs):'                                            
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/validators.py", line 328, in iter_errors'
    b'    for error in errors:'                    
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/_validators.py", line 22, in patternProperties'
    b'    if re.search(pattern, k):'               
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/re.py", line 199, 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/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 145, in check_validation_error'
    b'    method(body=body, req=req)'              
    b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/__init__.py", line 107, in wrapper'
    b"    _schema_validation_helper(request_body_schema, kwargs['body'],"                             
    b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/__init__.py", line 88, in _schema_validation_helper'
    b'    schema_validator.validate(target)'       
    b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/validators.py", line 314, 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/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 451, in test_validate_patternProperties_fails'
    b"    self.check_validation_error(self.post, body={None: 'bar'},"                                 
    b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 152, in check_validation_error'
    b"    self.assertEqual(expected_detail, ex.kwargs['detail'],"                                     
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py", line 411, in assertEqual'
    b'    self.assertThat(observed, matcher, message)'                                                
    b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/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
         Status: New

-- 
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/1855493

Title:
  py38 unit test failure - test_validate_patternProperties_fails

Status in OpenStack Compute (nova):
  New

Bug description:
  {0} nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails [0.132395s] ... FAILED
                                                                                                                                                                                                              
  Captured traceback:                                                                                   
  ~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                             b'Traceback (most recent call last):'                                                             
      b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/validators.py", line 280, in validate'                                
      b'    self.validator.validate(*args, **kwargs)'                                                   
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/validators.py", line 352, in validate'         
      b'    for error in self.iter_errors(*args, **kwargs):'                                            
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/validators.py", line 328, in iter_errors'
      b'    for error in errors:'                    
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/jsonschema/_validators.py", line 22, in patternProperties'
      b'    if re.search(pattern, k):'               
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/re.py", line 199, 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/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 145, in check_validation_error'
      b'    method(body=body, req=req)'              
      b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/__init__.py", line 107, in wrapper'
      b"    _schema_validation_helper(request_body_schema, kwargs['body'],"                             
      b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/__init__.py", line 88, in _schema_validation_helper'
      b'    schema_validator.validate(target)'       
      b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/api/validation/validators.py", line 314, 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/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 451, in test_validate_patternProperties_fails'
      b"    self.check_validation_error(self.post, body={None: 'bar'},"                                 
      b'  File "/home/corey/pkg/ussuri/upstream/nova/nova/tests/unit/test_api_validation.py", line 152, in check_validation_error'
      b"    self.assertEqual(expected_detail, ex.kwargs['detail'],"                                     
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py", line 411, in assertEqual'
      b'    self.assertThat(observed, matcher, message)'                                                
      b'  File "/home/corey/pkg/ussuri/upstream/nova/.tox/py38/lib/python3.8/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/1855493/+subscriptions


Follow ups