'Test list_images functionality.'

def test_list_images(self):

    images = self.driver.list_images()
    self.assertEqual(len(images), 2)
    image = images[0]
    self.assertEqual(image.id, '5')
    self.assertEqual(image.name, 'Ubuntu    9.04    LAMP')
    self.assertEqual(image.extra['description'], 'Ubuntu    9.04    LAMP    Description')
    self.assertEqual(image.extra['type'], 'OS')
    self.assertEqual(image.extra['size'], '2048')
    image = images[1]
    self.assertEqual(image.id, '15')
    self.assertEqual(image.name, 'Ubuntu    9.04    LAMP')
    self.assertEqual(image.extra['description'], 'Ubuntu    9.04    LAMP    Description')
    self.assertEqual(image.extra['type'], 'OS')
    self.assertEqual(image.extra['size'], '2048')
