'Tests creates an image from location and conflict image size'

def test_add_location_with_conflict_image_size(self):

    fixture_headers = {'x-image-meta-store': 'file', 'x-image-meta-disk-format': 'vhd', 'x-image-meta-location': 'http://a/b/c.tar.gz', 'x-image-meta-container-format': 'ovf', 'x-image-meta-name': 'fake    image    #F', 'x-image-meta-size': '1'}
    req = webob.Request.blank('/images')
    req.headers['Content-Type'] = 'application/octet-stream'
    req.method = 'POST'
    http = store.get_store_from_scheme('http')
    with mock.patch.object(http, 'get_size') as size:
        size.return_value = 2
        for (k, v) in six.iteritems(fixture_headers):
            req.headers[k] = v
        res = req.get_response(self.api)
        self.assertEqual(http_client.CONFLICT, res.status_int)
