'Tests that the /images registry API returns list of
public images sorted by updated_at in descending order.'

def test_get_index_sort_updated_at_desc(self):

    now = timeutils.utcnow()
    time1 = (now + datetime.timedelta(seconds=5))
    time2 = now
    UUID3 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID3, created_at=None, updated_at=time1)
    db_api.image_create(self.context, extra_fixture)
    UUID4 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID4, created_at=None, updated_at=time2)
    db_api.image_create(self.context, extra_fixture)
    images = self.client.get_images(sort_key='updated_at', sort_dir='desc')
    self.assertEqualImages(images, (UUID3, UUID4, UUID2), unjsonify=False)
