streamline account creation and add tests

also incorporates nine.testrun.org user policies
This commit is contained in:
holger krekel
2023-11-01 20:30:12 +01:00
parent 3a9db729f8
commit ca763960e5
3 changed files with 49 additions and 25 deletions

View File

@@ -195,8 +195,8 @@ def gencreds(maildomain):
num = next(count)
alphanumeric = "abcdefghijklmnopqrstuvwxyz1234567890"
user = "".join(random.choices(alphanumeric, k=10))
user = f"ac{num}_{user}"
password = "".join(random.choices(alphanumeric, k=10))
user = f"ac{num}_{user}"[:9]
password = "".join(random.choices(alphanumeric, k=12))
yield f"{user}@{domain}", f"{password}"
return lambda domain=None: next(gen(domain))