Beispiel #1
0
 def test_find_next_password_1(self):
     self.test_password = day11.password("abcdefgh")
     self.test_password.find_next_password()
     self.assertEqual("abcdffaa", self.test_password.get_password())
Beispiel #2
0
 def test_find_next_password_2(self):
     self.test_password = day11.password("ghijklmn")
     self.test_password.find_next_password()
     self.assertEqual("ghjaabcc", self.test_password.get_password())
Beispiel #3
0
 def test_rule_1_2(self):
     self.test_password = day11.password("aeiopqff")
     self.assertEqual(True, self.test_password.meets_requirement_1())
Beispiel #4
0
 def test_increment_password_4(self):
     self.test_password = day11.password("aazzaazz")
     self.test_password.increment_password()
     self.assertEqual("aazzabaa", self.test_password.get_password())
Beispiel #5
0
 def test_increment_character_1(self):
     self.test_password = day11.password("aaaaaaaa")
     self.assertEqual("b", self.test_password.increment_character("a"))
     self.assertEqual("g", self.test_password.increment_character("f"))
     self.assertEqual("a", self.test_password.increment_character("z"))
Beispiel #6
0
 def test_increment_password_1(self):
     self.test_password = day11.password("aaaaaaaa")
     self.test_password.increment_password()
     self.assertEqual("aaaaaaab", self.test_password.get_password())
Beispiel #7
0
 def test_is_valid_2(self):
     self.test_password = day11.password("abcdffaa")
     self.assertEqual(True, self.test_password.is_valid())
Beispiel #8
0
 def test_is_valid_3(self):
     self.test_password = day11.password("ghjaabcc")
     self.assertEqual(True, self.test_password.is_valid())
Beispiel #9
0
 def test_combo_2(self):
     self.test_password = day11.password("abbceffg")
     self.assertEqual(False, self.test_password.meets_requirement_1())
     self.assertEqual(True, self.test_password.meets_requirement_3())
Beispiel #10
0
 def test_is_valid_1(self):
     self.test_password = day11.password("abbcegjk")
     self.assertEqual(False, self.test_password.is_valid())
Beispiel #11
0
 def test_combo_1(self):
     self.test_password = day11.password("hijklmmn")
     self.assertEqual(True, self.test_password.meets_requirement_1())
     self.assertEqual(False, self.test_password.meets_requirement_2())
Beispiel #12
0
 def test_rule_3_4(self):
     self.test_password = day11.password("abcccefg")
     self.assertEqual(False, self.test_password.meets_requirement_3())
Beispiel #13
0
 def test_rule_3_3(self):
     self.test_password = day11.password("abbcddef")
     self.assertEqual(True, self.test_password.meets_requirement_3())
Beispiel #14
0
 def test_rule_2_4(self):
     self.test_password = day11.password("abcdefgl")
     self.assertEqual(False, self.test_password.meets_requirement_2())
Beispiel #15
0
 def test_rule_2_1(self):
     self.test_password = day11.password("abcdefgh")
     self.assertEqual(True, self.test_password.meets_requirement_2())