def test_change_public_access(self):
        """Test change public access."""
        a_file = self.vgw.make_file(self.vgw.get_root().id, 'the file name')
        a_file = self.vgw.change_public_access(a_file.id, True)
        f1 = StorageObject.objects.get(id=a_file.id)
        self.assertEqual(f1.generation, 2)
        self.assertEqual(f1.generation_created, 1)
        self.assertIsNotNone(f1.public_uuid)
        # make sure the uuid is still saved despite other changes
        a_file = self.vgw.change_public_access(a_file.id, False)
        f1 = StorageObject.objects.get(id=a_file.id)
        self.assertIsNone(f1.public_uuid)
        a_file = self.vgw.change_public_access(a_file.id, True)
        f1 = StorageObject.objects.get(id=a_file.id)
        self.assertIsNotNone(f1.public_uuid)