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