def tearDownClass(cls):
        """
        Clean up generated files if all tests pass.
        """
        if not any(error for _, error in getattr(cls, '_outcome', unittest.TestResult()).errors):
            for file in cls.tmp_dir.iterdir():
                file.unlink()
            cls.tmp_dir.rmdir()

        Clean up generated files if all tests pass.
        
tests/test_authentication.py