Unit test test_restore_backup_with_body_KeyError fails under Python 3.6

Bug #1749927 reported by Thomas Goirand
This bug report is a duplicate of:  Bug #1749953: Add support for Python 3.6. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

Running unit tests under Python 3.6 leads to this error (while it works in Python 2.7):

cinder.tests.unit.api.contrib.test_backups.BackupsAPITestCase.test_restore_backup_with_body_KeyError
----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/home/zigo/sources/openstack/queens/services/cinder/build-area/cinder-12.0.0~rc1/cinder/tests/unit/api/contrib/test_backups.py", line 1465, in test_restore_backup_with_body_KeyError'
    b" res_dict['badRequest']['message'])"
    b' File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in assertEqual'
    b' self.assertThat(observed, matcher, message)'
    b' File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat'
    b' raise mismatch_error'
    b'testtools.matchers._impl.MismatchError: !=:'
    b'reference = "Additional properties are not allowed (\'\' was unexpected)"'
    b'actual = "\'restore\' is a required property"'
    b''
    b''

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    b'2018-02-16 10:44:32,625 INFO [cinder.rpc] Automatically selected cinder-scheduler objects version 1.35 as minimum service version.'
    b'2018-02-16 10:44:32,627 INFO [cinder.rpc] Automatically selected cinder-scheduler RPC version 3.10 as minimum service version.'
    b'2018-02-16 10:44:32,630 INFO [cinder.rpc] Automatically selected cinder-volume objects version 1.35 as minimum service version.'
    b'2018-02-16 10:44:32,632 INFO [cinder.rpc] Automatically selected cinder-volume RPC version 3.15 as minimum service version.'
    b'2018-02-16 10:44:32,634 INFO [cinder.rpc] Automatically selected cinder-backup objects version 1.35 as minimum service version.'
    b'2018-02-16 10:44:32,637 INFO [cinder.rpc] Automatically selected cinder-backup RPC version 2.1 as minimum service version.'
    b'2018-02-16 10:44:32,790 INFO [cinder.api.openstack.wsgi] POST http://localhost/v2/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/backups/7f1821ac-cb5d-46d2-beda-8bdc899f9546/restore'
    b'2018-02-16 10:44:32,791 INFO [cinder.api.openstack.wsgi] http://localhost/v2/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/backups/7f1821ac-cb5d-46d2-beda-8bdc899f9546/restore returned with HTTP 400'
    b''

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.