示例#1
0
 def test_validate_2_char_valid(self):
     pwd = 'ab'
     policy = {'a': [1, 2]}
     self.assertTrue(is_valid_pos(pwd, policy))
示例#2
0
 def test_validate_5_char_with_repetition_valid(self):
     pwd = 'abbca'
     policy = {'a': [1, 4]}
     self.assertTrue(is_valid_pos(pwd, policy))
示例#3
0
 def test_validate_5_char_with_repetition_invalid(self):
     pwd = 'booze'
     policy = {'o': [2, 3]}
     self.assertFalse(is_valid_pos(pwd, policy))
示例#4
0
 def test_validate_2_char_invalid(self):
     pwd = 'aa'
     policy = {'a': [1, 2]}
     self.assertFalse(is_valid_pos(pwd, policy))