]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Port test_emc_vnx to Python 3
authorVictor Stinner <vstinner@redhat.com>
Mon, 15 Feb 2016 13:43:32 +0000 (14:43 +0100)
committerVictor Stinner <vstinner@redhat.com>
Mon, 15 Feb 2016 13:51:19 +0000 (14:51 +0100)
commitf0ef5e50e4bda799d870a5694b01eae73a9f1a58
treed9dd33591483f7ca2dfabfcf0a4f1dd34c27f936
parent4abec53243a9f73b7fc68e0604df9c50d2458c50
Port test_emc_vnx to Python 3

* Configuration.__getattr__(): replace self.local_conf with
  object.__getattribute__(self, 'local_conf') to avoid reentrant call
  to __getattr__() in copy.copy(conf) on Python 3.
* test_emc_vnx: Don't compare directly provider_location strings but
  set of provider_location items to support hash randomization. On
  Python 3, hash randomization is enabled by default and so
  dictionary items are rendered in an random order.
* test_emc_vnx: use assertIn() to check if the provider_location
  contains 'type^smp' substring. Before, the test failed if the
  substring was a the beginning of the string (position 0).
* tests-py3.txt: add cinder.tests.unit.test_emc_vnx

Partial-Implements: blueprint cinder-python3
Related-Bug: 1348818
Change-Id: If3be17ca6a1d14d6f1a16ee9934221f77e161686
cinder/tests/unit/test_emc_vnx.py
cinder/volume/configuration.py
tests-py3.txt