'Fetch all images and then fetch with filters'

def test_list_images(self):

    all_images = self.driver.list_images()
    hdd_images = self.driver.list_images('HDD')
    cdd_images = self.driver.list_images('CDROM')
    private_images = self.driver.list_images(is_public=False)
    self.assertEqual(len(all_images), 4)
    self.assertEqual(len(hdd_images), 2)
    self.assertEqual(len(cdd_images), 2)
    self.assertEqual(len(private_images), 2)
    image = all_images[0]
    extra = image.extra
    '\n                                Standard    properties\n                                '
    self.assertEqual(image.id, 'img-1')
    self.assertEqual(image.name, 'Test-Image-Two-CDROM')
    '\n                                Extra    metadata\n                                '
    self.assertEqual(extra['created_date'], '2014-11-14T15:22:19Z')
    self.assertEqual(extra['created_by'], 'System')
    self.assertEqual(extra['etag'], '957e0eac7456fa7554e73bf0d18860eb')
    self.assertEqual(extra['last_modified_date'], '2014-11-14T15:22:19Z')
    self.assertEqual(extra['last_modified_by'], 'System')
    '\n                                Extra    properties\n                                '
    self.assertEqual(extra['name'], 'Test-Image-Two-CDROM')
    self.assertEqual(extra['description'], '')
    self.assertEqual(extra['location'], 'us/las')
    self.assertEqual(extra['size'], 4)
    self.assertEqual(extra['cpu_hot_plug'], False)
    self.assertEqual(extra['cpu_hot_unplug'], False)
    self.assertEqual(extra['ram_hot_plug'], False)
    self.assertEqual(extra['ram_hot_unplug'], False)
    self.assertEqual(extra['nic_hot_plug'], False)
    self.assertEqual(extra['nic_hot_unplug'], False)
    self.assertEqual(extra['disc_virtio_hot_plug'], False)
    self.assertEqual(extra['disc_virtio_hot_unplug'], False)
    self.assertEqual(extra['disc_scsi_hot_plug'], False)
    self.assertEqual(extra['disc_scsi_hot_unplug'], False)
    self.assertEqual(extra['licence_type'], 'OTHER')
    self.assertEqual(extra['image_type'], 'CDROM')
    self.assertEqual(extra['public'], True)
