Update test.py (#5721)

pull/5725/head
merwanehamadi 2023-10-13 06:56:52 -07:00 committed by GitHub
parent 38790a27ed
commit 93e3ec36ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -16,13 +16,9 @@ class TestPasswordGenerator(unittest.TestCase):
password_generator.generate_password(17)
def test_password_content(self):
password = password_generator.generate_password(8)
self.assertTrue(any(c.islower() for c in password))
self.assertTrue(any(c.isupper() for c in password))
password = password_generator.generate_password()
self.assertTrue(any(c.isdigit() for c in password))
self.assertTrue(
any(c in password_generator.string.punctuation for c in password)
)
self.assertTrue(any(c in password_generator.string.punctuation for c in password))
if __name__ == "__main__":