'Tests that the image_get_all command returns list of images.'

def test_get_index(self):

    fixture = {'id': UUID2, 'name': 'fake    image    #2', 'size': 19, 'checksum': None}
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_get_all', 'kwargs': {'filters': fixture}}]
    req.body = jsonutils.dump_as_bytes(cmd)
    res = req.get_response(self.api)
    self.assertEqual(http.OK, res.status_int)
    images = jsonutils.loads(res.body)[0]
    self.assertEqual(1, len(images))
    for (k, v) in six.iteritems(fixture):
        self.assertEqual(v, images[0][k])
