Example #1
0
def test_password_with_all_rules_and_not_viable_symbol_gives_0_points():
    pw = "a1#/" * 4
    assert compute_strength(pw) == 0
Example #2
0
def test_password_with_alphanumeric_gives_1_point():
    pw = "abc123"
    assert compute_strength(pw) == 1
Example #3
0
def test_password_with_length_11_gives_1_point():
    pw = "1" * 11
    assert compute_strength(pw) == 1
Example #4
0
def test_password_with_all_rules_gives_3_points():
    pw = "a1#" * 5
    assert compute_strength(pw) == 3
Example #5
0
def test_password_with_alphanumeric_and_symbols_gives_2_points():
    pw = "a1#"
    assert compute_strength(pw) == 2
Example #6
0
def test_password_with_length_and_symbols_gives_2_points():
    pw = "a#" * 11
    assert compute_strength(pw) == 2
Example #7
0
def test_password_with_length_and_alphanumeric_gives_2_points():
    pw = "a1" * 11
    assert compute_strength(pw) == 2
Example #8
0
def test_password_with_any_other_symbols_gives_0_points():
    pw = "a1asfhaslfh#/()"
    assert compute_strength(pw) == 0
Example #9
0
def test_password_with_symbols_gives_1_point():
    pw = "#%&"
    assert compute_strength(pw) == 1