From 4c156a80375c01433cdd00546c6278edb0bb6025 Mon Sep 17 00:00:00 2001 From: sxt1001 Date: Mon, 21 Oct 2024 23:40:25 +0800 Subject: [PATCH] test: Fix duplicate judgment conditions in password generation (#5835) Reference:https://github.com/canonical/cloud-init/commit/4c156a80375c01433cdd00546c6278edb0bb6025 Conflict:NA The problem was introduced by commit 879945f --- tests/unittests/config/test_cc_set_passwords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unittests/config/test_cc_set_passwords.py b/tests/unittests/config/test_cc_set_passwords.py index 73cb3d490..c068f62d8 100644 --- a/tests/unittests/config/test_cc_set_passwords.py +++ b/tests/unittests/config/test_cc_set_passwords.py @@ -566,7 +566,7 @@ class TestRandUserPassword: [ any(c.islower() for c in str), any(c.isupper() for c in str), - any(c.isupper() for c in str), + any(c.isdigit() for c in str), any(c in string.punctuation for c in str), ] ) -- 2.33.0