diff --git a/frappe/tests/test_password_strength.py b/frappe/tests/test_password_strength.py index 5dc87d185d..4296548861 100644 --- a/frappe/tests/test_password_strength.py +++ b/frappe/tests/test_password_strength.py @@ -3,10 +3,18 @@ from string import printable from time import time from unittest import TestCase +from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_fixed + from frappe.utils.password_strength import test_password_strength class TestPasswordStrength(TestCase): + @retry( + retry=retry_if_exception_type(AssertionError), + stop=stop_after_attempt(3), + wait=wait_fixed(0.5), + reraise=True, + ) def test_long_password(self): password = "".join(random.choice(printable) for _ in range(600))