Fix CSRF test isolation

This commit is contained in:
Frank Song committed 2026-05-18 07:27:31 +08:00
1 parent 996942429c
commit 496b34fe4d
3 files changed
+52 -2

No files matched your search

+2
View File
@@ -261,6 +261,8 @@ class TestPasswordCacheInvalidation(unittest.TestCase):
def tearDown(self):
if self._backup is not None:
self._sf.write_text(self._backup, encoding='utf-8')
elif self._sf.exists():
self._sf.unlink()
auth._invalidate_password_hash_cache()
os.environ.pop('HERMES_WEBUI_PASSWORD', None)