'Tests that a detailed call returns list of
public images sorted by name-size and
size-name in ascending and descending orders.'

def test_get_image_details_sort_multiple_dirs(self):

    UUID3 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID3, name='asdf', size=19)
    db_api.image_create(self.context, extra_fixture)
    UUID4 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID4, name='xyz', size=20)
    db_api.image_create(self.context, extra_fixture)
    UUID5 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID5, name='asdf', size=20)
    db_api.image_create(self.context, extra_fixture)
    images = self.client.image_get_all(sort_key=['name', 'size'], sort_dir=['asc', 'desc'])
    self.assertEqualImages(images, (UUID5, UUID3, UUID1, UUID2, UUID4), unjsonify=False)
    images = self.client.image_get_all(sort_key=['name', 'size'], sort_dir=['desc', 'asc'])
    self.assertEqualImages(images, (UUID4, UUID2, UUID1, UUID3, UUID5), unjsonify=False)
    images = self.client.image_get_all(sort_key=['size', 'name'], sort_dir=['asc', 'desc'])
    self.assertEqualImages(images, (UUID1, UUID2, UUID3, UUID4, UUID5), unjsonify=False)
    images = self.client.image_get_all(sort_key=['size', 'name'], sort_dir=['desc', 'asc'])
    self.assertEqualImages(images, (UUID5, UUID4, UUID3, UUID2, UUID1), unjsonify=False)
