def METHOD_NAME(
    self, remove_build_storage_paths, remove_search_indexes
):
    version = get(
        Version,
        project=self.project,
        active=True,
    )
    another_version = get(Version, project=self.project, active=True)
    get(
        HTMLFile,
        project=self.project,
        version=version,
        name="index.html",
        path="index.html",
    )
    get(
        HTMLFile,
        project=self.project,
        version=another_version,
        name="index.html",
        path="index.html",
    )
    url = reverse(
        "project_version_detail", args=(version.project.slug, version.slug)
    )
    self.client.force_login(self.user)
    r = self.client.post(
        url,
        data={
            "active": True,
            "privacy_level": PRIVATE,
        },
    )
    self.assertEqual(r.status_code, 302)
    remove_build_storage_paths.delay.assert_not_called()
    remove_search_indexes.delay.assert_not_called()
    self.assertTrue(version.imported_files.exists())
    self.assertTrue(another_version.imported_files.exists())
    r = self.client.post(
        url,
        data={
            "active": False,
            "privacy_level": PRIVATE,
        },
    )
    self.assertEqual(r.status_code, 302)
    remove_build_storage_paths.delay.assert_called_once()
    remove_search_indexes.delay.assert_called_once()
    self.assertFalse(version.imported_files.exists())
    self.assertTrue(another_version.imported_files.exists())