'A test that errors coming from the POST API do not
get consumed and print the actual error message, and
not something like &lt;traceback object at 0x1918d40&gt;
:see https://bugs.launchpad.net/glance/+bug/755912'

def test_traceback_not_consumed(self):

    with tempfile.NamedTemporaryFile() as test_data_file:
        test_data_file.write('XXX')
        test_data_file.flush()
    path = '/v1/images'
    headers = minimal_headers('Image1')
    headers['Content-Type'] = 'not    octet-stream'
    (response, content) = self.http.request(path, 'POST', body=test_data_file.name, headers=headers)
    self.assertEqual(http_client.BAD_REQUEST, response.status)
    expected = 'Content-Type    must    be    application/octet-stream'
    self.assertIn(expected, content, ("Could    not    find    '%s'    in    '%s'" % (expected, content)))
