Esempio n. 1
0
def test_onlyCharsInPasswordAll():
    error = False
    try:
        passwordValidator.onlyCharsInPassword(testPwd, [(chr(0), chr(128))])
    except:
        error = True
    assert (error)
Esempio n. 2
0
def test_onlyCharsInPasswordSymbol():
    assert (not passwordValidator.onlyCharsInPassword(testPwd, [('!', '/'),
                                                                (':', '@'),
                                                                ('[', '`'),
                                                                ('{', '~')]))
Esempio n. 3
0
def test_onlyCharsInPasswordNumber():
    assert (not passwordValidator.onlyCharsInPassword(testPwd, [('0', '9')]))
Esempio n. 4
0
def test_onlyCharsInPasswordUpperAndLower():
    assert (not passwordValidator.onlyCharsInPassword(testPwd, [('A', 'Z'),
                                                                ('a', 'z')]))
Esempio n. 5
0
def test_onlyCharsInPasswordNone():
    assert (not passwordValidator.onlyCharsInPassword(testPwd, []))