Exemple #1
0
 def test_valid_simple_alphanumeric_password_with_mapped_to_space_characters(self):
     password = ''.join(['123', lookup('FIGURE SPACE'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123 abc', validated)
Exemple #2
0
 def test_valid_simple_alphanumeric_password_with_non_ascii_characters(self):
     password = ''.join(['123', lookup('POUND SIGN'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123\xc2\xa3abc', validated)
Exemple #3
0
 def test_valid_simple_alphanumeric_password_with_mapped_to_nothing_characters(self):
     password = ''.join(['123', lookup('SOFT HYPHEN'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123abc', validated)
Exemple #4
0
 def test_valid_simple_alphanumeric_bytes_password(self):
     password = b'abcdefg1234567890ABCDEFG'
     validated = validate_simple_password(password)
     self.assertEqual(b'abcdefg1234567890ABCDEFG', validated)
Exemple #5
0
 def test_valid_simple_alphanumeric_password_with_ascii_characters(self):
     password = b'abcdefg1234567890ABCDEFG!"$%&/()='
     validated = validate_simple_password(password)
     self.assertEqual(password, validated)
Exemple #6
0
 def test_valid_simple_alphanumeric_password_with_mapped_to_space_characters(
         self):
     password = ''.join(['123', lookup('FIGURE SPACE'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123 abc', validated)
Exemple #7
0
 def test_valid_simple_alphanumeric_password_with_mapped_to_nothing_characters(
         self):
     password = ''.join(['123', lookup('SOFT HYPHEN'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123abc', validated)
Exemple #8
0
 def test_valid_simple_alphanumeric_password_with_non_ascii_characters(
         self):
     password = ''.join(['123', lookup('POUND SIGN'), 'abc'])
     validated = validate_simple_password(password)
     self.assertEqual(b'123\xc2\xa3abc', validated)
Exemple #9
0
 def test_valid_simple_alphanumeric_password_with_ascii_characters(self):
     password = b'abcdefg1234567890ABCDEFG!"$%&/()='
     validated = validate_simple_password(password)
     self.assertEqual(password, validated)
Exemple #10
0
 def test_valid_simple_alphanumeric_bytes_password(self):
     password = b'abcdefg1234567890ABCDEFG'
     validated = validate_simple_password(password)
     self.assertEqual(b'abcdefg1234567890ABCDEFG', validated)