'Test image download returns HTTPServiceUnavailable.'

def test_download_service_unavailable(self):

    image_fixture = self.FIXTURES[1]
    image_fixture.update({'location': 'http://0.0.0.0:1/file.tar.gz'})
    request = webob.Request.blank(('/images/%s' % UUID2))
    request.context = self.context
    image_controller = glance.api.v1.images.Controller()
    with mock.patch.object(image_controller, 'get_active_image_meta_or_error') as mocked_get_image:
        mocked_get_image.return_value = image_fixture
        self.assertRaises(webob.exc.HTTPServiceUnavailable, image_controller.show, request, mocked_get_image)
