From 8ed26cef7db4aeac844b46aed4d258c908f16d54 Mon Sep 17 00:00:00 2001 From: Aleksei Chetaev Date: Mon, 6 Mar 2023 17:39:03 +0100 Subject: [PATCH] Fix issue with generate random string Signed-off-by: Aleksei Chetaev --- src/frostfs_testlib/utils/string_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frostfs_testlib/utils/string_utils.py b/src/frostfs_testlib/utils/string_utils.py index 490217d..a80192c 100644 --- a/src/frostfs_testlib/utils/string_utils.py +++ b/src/frostfs_testlib/utils/string_utils.py @@ -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: