forked from TrueCloudLab/frostfs-testlib
Fix issue with generate random string
Signed-off-by: Aleksei Chetaev <alex.chetaev@gmail.com>
This commit is contained in:
parent
71b35d45c3
commit
8ed26cef7d
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import string
|
|||
|
||||
ONLY_ASCII_LETTERS = string.ascii_letters
|
||||
DIGITS_AND_ASCII_LETTERS = string.ascii_letters + string.digits
|
||||
NON_DIGITS_AND_LETTERS = string.punctuation
|
||||
|
||||
|
||||
def random_string(length: int = 5, source: str = ONLY_ASCII_LETTERS):
|
||||
|
@ -17,7 +18,7 @@ def random_string(length: int = 5, source: str = ONLY_ASCII_LETTERS):
|
|||
(str): random string with len == length
|
||||
"""
|
||||
|
||||
return "".join(random.choice(string.ascii_letters) for i in range(length))
|
||||
return "".join(random.choice(source) for i in range(length))
|
||||
|
||||
|
||||
def is_str_match_pattern(error: Exception, status_pattern: str) -> bool:
|
||||
|
|
Loading…
Reference in a new issue