@mock.patch.object(filecache, 'save_data', autospec=True)
    def test__http_request_client_fallback_fail(self, mock_save_data):
        # Test when fallback to a supported version fails
        host, port, latest_ver = 'localhost', '1234', '1.6'
        error_body = _get_error_body()

        client = http.HTTPClient('http://%s:%s/' % (host, port))
        client.session = utils.FakeSession(
            {'X-OpenStack-Ironic-API-Minimum-Version': '1.1',
             'X-OpenStack-Ironic-API-Maximum-Version': latest_ver,
             'content-type': 'text/plain',
             },
            six.StringIO(error_body),
            version=1,
            status_code=http_client.NOT_ACCEPTABLE)
        self.assertRaises(
            exc.UnsupportedVersion,
            client._http_request,
            '/v1/resources',
            'GET')
        mock_save_data.assert_called_once_with(host=host, data=latest_ver,
                                               port=port)
dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/tests/unit/common/test_http.py/HttpClientTest.test__http_request_client_fallback_fail/original