@skip_if_disabled
    def test_traceback_not_consumed(self):
        self.cleanup()
        self.start_servers(**self.__dict__.copy())

        # POST /images with binary data, but not setting
        # Content-Type to application/octet-stream, verify a
        # 400 returned and that the error is readable.
        with tempfile.NamedTemporaryFile() as test_data_file:
            test_data_file.write("XXX")
            test_data_file.flush()
        path = "https://%s:%d/v1/images" % ("0.0.0.0", self.api_port)
        https = httplib2.Http(disable_ssl_certificate_validation=True)
        response, content = https.request(path, 'POST',
                            body=test_data_file.name)
        self.assertEqual(response.status, 400)
        expected = "Content-Type must be application/octet-stream"
        self.assertTrue(expected in content,
                        "Could not find '%s' in '%s'" % (expected, content))

        self.stop_servers()
A test that errors coming from the POST API do not
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/tests/functional/test_ssl.py/TestSSL.test_traceback_not_consumed