cinder/cinder/tests/unit/keymgr
Victor Stinner 068db12d09 Port test_volume to Python 3
* don't use hasttr() to check if a lazy SQLAlchemy is loaded or not: use
  the obj_attr_is_set() method instead. On Python 3, hasattr() pass
  through SQLAlchemy exceptions which is unexpected.
* Replace a/b with a//b to use integer division, not float division.
* Replace filter() with list-comprehension using an if.
* Replace file() with open() and open /dev/null in binary mode (not text
  mode, so Unicode on Python 3).
* test_volume require "import cinder.volume.targets.tgt" on Python 3
* Use a key function to sort a list of dictionaries. Dictionaries are no
  more comparable on Python 3.
* tox.ini: add the following tests to Python 3.4.

  - cinder.tests.unit.keymgr.test_mock_key_mgr
  - cinder.tests.unit.test_volume

Note: test_list_availability_zones_enabled_service() of test_volume
was broken, the test checked that the result of .sort() is None...

Blueprint cinder-python3
Change-Id: If1a26acc0138db9bda7fde1cb1f40093d9b3c494
2015-09-29 14:22:40 +02:00
..
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fake.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
mock_key_mgr.py Port test_volume to Python 3 2015-09-29 14:22:40 +02:00
test_barbican.py Merge "Fix order of arguments in assertEqual" 2015-09-14 22:25:42 +00:00
test_conf_key_mgr.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
test_key.py Fix order of arguments in assertEqual 2015-08-03 19:26:08 -07:00
test_key_mgr.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
test_mock_key_mgr.py Port test_volume to Python 3 2015-09-29 14:22:40 +02:00
test_not_implemented_key_mgr.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00