def test_contains_iol(): validator = Validator() assert_equals(True, validator._contains_iol("hijklmn")) assert_equals(True, validator._contains_iol("aaibb")) assert_equals(True, validator._contains_iol("aaobb")) assert_equals(True, validator._contains_iol("aalbb")) assert_equals(False, validator._contains_iol("aaxbb"))
def test_contains_sequence_of_three(): validator = Validator() assert_equals(True, validator._contains_sequence_of_three("xxabcyy")) assert_equals(False, validator._contains_sequence_of_three("abdce"))
def test_contains_two_different_pairs(): validator = Validator() assert_equals(True, validator._contains_two_different_pairs("abbceffg")) assert_equals(False, validator._contains_two_different_pairs("abbcefg"))