kyu_7.password_validator package
Submodules
kyu_7.password_validator.password module
Solution for -> Password validator.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_7.password_validator.password.password(string: str) bool[source]
Password validator function.
Your job is to create a simple password validation function, as seen on many websites.
You are permitted to use any methods to validate the password.
The rules for a valid password are as follows:
There needs to be at least 1 uppercase letter.
There needs to be at least 1 lowercase letter.
There needs to be at least 1 number.
The password needs to be at least 8 characters long.
- Parameters:
string
- Returns:
kyu_7.password_validator.test_password module
Test for -> Password validator.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_7.password_validator.test_password.PasswordTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting password function.
- _classSetupFailed = False
- _class_cleanups = []
- test_password = None
- test_password_0_Abcd1234(**kw)
Testing password function with various test inputs [with string=’Abcd1234’, expected=True].
- Returns:
- test_password_1_Abcd123(**kw)
Testing password function with various test inputs [with string=’Abcd123’, expected=False].
- Returns:
- test_password_2_abcd1234(**kw)
Testing password function with various test inputs [with string=’abcd1234’, expected=False].
- Returns:
- test_password_3_AbcdefGhijKlmnopQRsTuvwxyZ1234567890(**kw)
Testing password function with various test inputs [with string=’AbcdefGhijKlmnopQRsTuvwxyZ1234567890’, expected=True].
- Returns:
- test_password_4_ABCD1234(**kw)
Testing password function with various test inputs [with string=’ABCD1234’, expected=False].
- Returns:
- test_password_5_Ab1___(**kw)
Testing password function with various test inputs [with string=’Ab1!@#$%^&*()-_+={}[]|\:;?/>.<,’, expected=True].
- Returns:
- test_password_6____(**kw)
Testing password function with various test inputs [with string=’!@#$%^&*()-_+={}[]|\:;?/>.<,’, expected=False].
- Returns:
- test_password_7_(**kw)
Testing password function with various test inputs [with string=’’, expected=False].
- Returns:
- test_password_8__aA1_(**kw)
Testing password function with various test inputs [with string=’ aA1—-’, expected=True].
- Returns:
- test_password_9_4aA1_(**kw)
Testing password function with various test inputs [with string=’4aA1—-’, expected=True].
- Returns:
Module contents
Password validator.