cinder/cinder/tests/unit/api
Victor Stinner 30c0f79781 Port API v1 and v2 to Python 3
* Replace jsonutils.dumps() with jsonutils.dump_as_bytes() since
  output is used for the HTTP body, and HTTP body type is bytes, not
  Unicode. On Python 3, jsonutils.dumps() returns Unicode.
* FakeHttplibSocket: replace io.StringIO with io.BytesIO, HTTP body
  type is bytes. Encode Unicode to UTF-8.
* Fix FakeHttplibSocket.makefile() API: only the first parameter is
  mandatory. On Python 3, it's only called with the first 'mode'
  parameter.
* Use bytes strings to test HTTP bodies (JSON or XML).
* Replace dict.values() with list(dict.values()) to get a list on
  Python 3.
* Replace error.message with encodeutils.exception_to_unicode(error),
  exceptions loose their message attribute in Python 3.
* Update JSON serializer test in test_wsgi.py to use bytes.
* tests-py3.txt: add cinder.tests.unit.api.v1 and
  cinder.tests.unit.api.v2

Partial-Implements: blueprint cinder-python3
Change-Id: I0f0048f4a1344feaa3434cbf7ebd31e3f12d6ae4
2016-02-15 15:22:05 +01:00
..
contrib Merge "Don't use Mock.called_once_with that does not exist" 2016-02-15 07:15:11 +00:00
extensions Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
middleware Convert Retry-After header parameter value to string 2015-10-05 15:24:28 +03:00
openstack Port API v1 and v2 to Python 3 2016-02-15 15:22:05 +01:00
v1 Port API v1 and v2 to Python 3 2016-02-15 15:22:05 +01:00
v2 Port API v1 and v2 to Python 3 2016-02-15 15:22:05 +01:00
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
common.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fakes.py Remove eventlet WSGI functionality 2015-12-11 21:23:48 +00:00
test_common.py Port API to Python 3 2015-10-14 22:17:26 +02:00
test_extensions.py Port API to Python 3 2015-10-14 22:17:26 +02:00
test_router.py Fix order of arguments in assertEqual 2015-08-03 19:26:08 -07:00
test_versions.py Fix wrong response with version details 2015-05-27 08:13:34 +08:00
test_xmlutil.py Port API to Python 3 2015-10-14 22:17:26 +02:00