Esempio n. 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())
Esempio n. 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())
Esempio n. 3
0
 def test_rule_1_2(self):
     self.test_password = day11.password("aeiopqff")
     self.assertEqual(True, self.test_password.meets_requirement_1())
Esempio n. 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())
Esempio n. 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"))
Esempio n. 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())
Esempio n. 7
0
 def test_is_valid_2(self):
     self.test_password = day11.password("abcdffaa")
     self.assertEqual(True, self.test_password.is_valid())
Esempio n. 8
0
 def test_is_valid_3(self):
     self.test_password = day11.password("ghjaabcc")
     self.assertEqual(True, self.test_password.is_valid())
Esempio n. 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())
Esempio n. 10
0
 def test_is_valid_1(self):
     self.test_password = day11.password("abbcegjk")
     self.assertEqual(False, self.test_password.is_valid())
Esempio n. 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())
Esempio n. 12
0
 def test_rule_3_4(self):
     self.test_password = day11.password("abcccefg")
     self.assertEqual(False, self.test_password.meets_requirement_3())
Esempio n. 13
0
 def test_rule_3_3(self):
     self.test_password = day11.password("abbcddef")
     self.assertEqual(True, self.test_password.meets_requirement_3())
Esempio n. 14
0
 def test_rule_2_4(self):
     self.test_password = day11.password("abcdefgl")
     self.assertEqual(False, self.test_password.meets_requirement_2())
Esempio n. 15
0
 def test_rule_2_1(self):
     self.test_password = day11.password("abcdefgh")
     self.assertEqual(True, self.test_password.meets_requirement_2())