Comment 3 for bug 1006725

Revision history for this message
Jordan Pittier (jordan-pittier) wrote : Re: Incorrect error returned during Create Image and multi byte characters used for Image name

If a try to run this test on a up o date ubuntu 12.10 I got

ERROR: tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestXML.test_create_image_specify_multibyte_character_image_name[negative]
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/opt/stack/tempest/tempest/api/compute/images/test_images_oneserver.py", line 72, in test_create_image_specify_multibyte_character_image_name
    snapshot_name)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 394, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_exception.py", line 99, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_higherorder.py", line 61, in match
    mismatch = matcher.match(matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 386, in match
    reraise(*matchee)
  File "/usr/local/lib/python2.7/dist-packages/testtools/matchers/_exception.py", line 92, in match
    result = matchee()
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 867, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/opt/stack/tempest/tempest/services/compute/xml/images_client.py", line 105, in create_image
    str(Document(post_body)), self.headers)
  File "/opt/stack/tempest/tempest/common/rest_client.py", line 174, in post
    return self.request('POST', url, headers, body)
  File "/opt/stack/tempest/tempest/common/rest_client.py", line 289, in request
    headers=headers, body=body)
  File "/opt/stack/tempest/tempest/common/rest_client.py", line 272, in _request
    headers=headers, body=body)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1543, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1293, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1230, in _conn_request
    conn.request(method, request_uri, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 962, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 996, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 958, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 816, in _send_output
    msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 58: ordinal not in range(128)