]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix list comparison for empty list
authorankitagrawal <ankit11.agrawal@nttdata.com>
Tue, 4 Aug 2015 11:20:12 +0000 (04:20 -0700)
committerankitagrawal <ankit11.agrawal@nttdata.com>
Fri, 7 Aug 2015 11:41:24 +0000 (04:41 -0700)
commitfbeb889b97be977574b2147daa05e38be3c0c6f2
tree93e3290f3710fa8cf02655a68e4f2667aa685fb1
parent690f1b24eb211b66b251d45456c172aed2ee67a9
Fix list comparison for empty list

Replaced boolean expression with 'not fields' in "_filter" method.
Also updated unit test cases which calls "_filter" method with
expected value of fields in restore methods.

The unit test "test_restore_vol_meta" was failing for empty list
because after updating the volume metadata, container was passed
to the "_restore_vol_meta" method where "metadata" is expected.
So fixed this unit test by passing the expected value to the
"_restore_vol_meta" method.

Closes-Bug: 1482619
Change-Id: I95c3a390b0b75c0514a3d63699367081440bf414
cinder/backup/driver.py
cinder/tests/unit/test_backup_driver_base.py