'Tests that the registry API creates the image'

def test_create_image(self):

    fixture = {'name': 'fake    public    image', 'status': 'active', 'visibility': 'public', 'disk_format': 'vhd', 'container_format': 'ovf'}
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_create', 'kwargs': {'values': fixture}}]
    req.body = jsonutils.dump_as_bytes(cmd)
    res = req.get_response(self.api)
    self.assertEqual(http.OK, res.status_int)
    res_dict = jsonutils.loads(res.body)[0]
    for (k, v) in six.iteritems(fixture):
        self.assertEqual(v, res_dict[k])
    self.assertEqual('active', res_dict['status'])
