test: retry flaky password_strength test thrice
This commit is contained in:
parent
b51a479fc2
commit
02f3fd8470
1 changed files with 8 additions and 0 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue