def cleanup(self, prep=False):
        if os.path.exists(self.file_path):
            os.remove(self.file_path)
        if prep:
            self.imported_module = sys.modules.get(self.imported)
            if self.imported_module:
                del sys.modules[self.imported]
        else:
            if self.imported_module:
                sys.modules[self.imported] = self.imported_module
        if os.path.exists(self.good_dir_path):
            os.rmdir(self.good_dir_path)
        if os.path.exists(self.bad_dir_path):
            os.rmdir(self.bad_dir_path)
Listing threads without the view_in_forum permission should 404.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_site.py/PthFile.cleanup--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_views.py/ThreadAuthorityPermissionsTests.test_read_without_permission