nova/nova/tests
Victor Stinner 0e5cefcf1d Fix Python 3 issues in nova.utils and nova.tests
* Fix sort(): dictionaries are no more comparable on Python 3, use a key
  function building a sorted list of the dictionary items
* Replace __builtin__ with six.moves.builtins
* get_hash_str() now accepts Unicode: Unicode is encoded to UTF-8
  before hashing the string. Mention also the hash method (MD5) in the
  docstring.
* LastBytesTestCase: use binary files instead of text files. Use also a
  context manager on the TemporaryFile to ensure that the temporary file
  is closed (even on error).
* Functions: use the __code__ attribute instead of func_code, and
  __closure__ instead of func_closure. These attributes are also
  available on Python 2.6.
* Replace unichr() with six.unichr()
* SafeTruncateTestCase(): write directly the chinese Unicode character
  instead of using safe_decode() (which is not reliable, it depends on
  the locale encoding!)
* sanitize_hostname(): On Python 3, decode the hostname from Latin1 to
  get back Unicode. Add also a comment explaining the purpose of the
  conversion to Latin1.
* last_bytes(): replace the hardcoded constant 22 with errno.EINVAL and
  add a comment explaining how the function works.
* tox.ini: add nova.tests.unit.test_utils to Python 3.4

Blueprint nova-python3
Change-Id: I96d9b0581ceaeccf9c35e0c9bada369e9d19fd15
2015-07-16 10:17:42 +02:00
..
functional Merge "Switch from MySQL-python to PyMySQL" 2015-07-15 15:53:35 +00:00
unit Fix Python 3 issues in nova.utils and nova.tests 2015-07-16 10:17:42 +02:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py Block subtractive operations in migrations for Kilo and beyond 2015-06-30 19:56:43 -07:00