Ejemplo n.º 1
0
 def test_valid_isbn_without_separating_dashes_with_X_check_digit(self):
     self.assertIs(verify('359821507X'), True)
Ejemplo n.º 2
0
 def test_invalid_check_digit_other_than_X(self):
     self.assertIs(verify('3-598-21507-A'), False)
Ejemplo n.º 3
0
 def test_invalid_X_other_than_check_digit(self):
     self.assertIs(verify('3-598-2X507-9'), False)
Ejemplo n.º 4
0
 def test_invalid_characters_are_not_ignored(self):
     self.assertIs(verify("3132P34035"), False)
Ejemplo n.º 5
0
 def test_invalid_check_digit(self):
     self.assertIs(verify('3-598-21508-9'), False)
Ejemplo n.º 6
0
 def test_valid_empty_isbn(self):
     self.assertIs(verify(''), False)
Ejemplo n.º 7
0
 def test_invalid_too_short_isbn(self):
     self.assertIs(verify("00"), False)
Ejemplo n.º 8
0
 def test_invalid_check_digit_other_than_X(self):
     self.assertIs(verify('3-598-21507-A'), False)
Ejemplo n.º 9
0
 def test_invalid_character_in_isbn(self):
     self.assertIs(verify('3-598-2K507-0'), False)
Ejemplo n.º 10
0
 def test_invalid_check_digit(self):
     self.assertIs(verify('3-598-21508-9'), False)
Ejemplo n.º 11
0
 def test_valid_with_X_check_digit(self):
     self.assertIs(verify('3-598-21507-X'), True)
Ejemplo n.º 12
0
 def test_input_is_too_long_but_contains_a_valid_isbn(self):
     self.assertIs(verify('98245726788'), False)
Ejemplo n.º 13
0
 def test_invalid_characters_are_not_ignored(self):
     self.assertIs(verify('3132P34035'), False)
Ejemplo n.º 14
0
 def test_input_is_nine_characters(self):
     self.assertIs(verify('134456729'), False)
Ejemplo n.º 15
0
 def test_invalid_too_long_isbn_with_no_dashes(self):
     self.assertIs(verify('3598215078X'), False)
Ejemplo n.º 16
0
 def test_invalid_X_other_than_check_digit(self):
     self.assertIs(verify('3-598-2X507-9'), False)
Ejemplo n.º 17
0
 def test_invalid_too_long_isbn(self):
     self.assertIs(verify('3-598-21507-XX'), False)
Ejemplo n.º 18
0
 def test_valid_isbn_without_separating_dashes(self):
     self.assertIs(verify('3598215088'), True)
Ejemplo n.º 19
0
 def test_invalid_too_short_isbn(self):
     self.assertIs(verify('00'), False)
Ejemplo n.º 20
0
 def test_valid_isbn_without_separating_dashes_with_X_check_digit(self):
     self.assertIs(verify('359821507X'), True)
Ejemplo n.º 21
0
 def test_input_is_nine_characters(self):
     self.assertIs(verify("134456729"), False)
Ejemplo n.º 22
0
 def test_invalid_isbn_without_check_digit_and_dashes(self):
     self.assertIs(verify('359821507'), False)
Ejemplo n.º 23
0
 def test_input_is_too_long_but_contains_a_valid_isbn(self):
     self.assertIs(verify("98245726788"), False)
Ejemplo n.º 24
0
 def test_invalid_too_long_isbn_with_no_dashes(self):
     self.assertIs(verify('3598215078X'), False)
Ejemplo n.º 25
0
 def test_valid_with_X_check_digit(self):
     self.assertIs(verify('3-598-21507-X'), True)
Ejemplo n.º 26
0
 def test_invalid_isbn_without_check_digit(self):
     self.assertIs(verify('3-598-21507'), False)
Ejemplo n.º 27
0
 def test_invalid_character_in_isbn(self):
     self.assertIs(verify('3-598-2K507-0'), False)
Ejemplo n.º 28
0
 def test_invalid_too_long_isbn(self):
     self.assertIs(verify('3-598-21507-XX'), False)
Ejemplo n.º 29
0
 def test_valid_isbn_without_separating_dashes(self):
     self.assertIs(verify('3598215088'), True)
Ejemplo n.º 30
0
 def test_invalid_check_digit_X_used_for_0(self):
     self.assertIs(verify('3-598-21515-X'), False)
Ejemplo n.º 31
0
 def test_invalid_isbn_without_check_digit_and_dashes(self):
     self.assertIs(verify('359821507'), False)
Ejemplo n.º 32
0
 def test_valid_empty_isbn(self):
     self.assertIs(verify(''), False)
Ejemplo n.º 33
0
 def test_invalid_isbn_without_check_digit(self):
     self.assertIs(verify('3-598-21507'), False)
Ejemplo n.º 34
0
 def test_valid_isbn_number(self):
     self.assertIs(verify('3-598-21508-8'), True)
Ejemplo n.º 35
0
 def test_invalid_check_digit_X_used_for_0(self):
     self.assertIs(verify('3-598-21515-X'), False)
Ejemplo n.º 36
0
 def test_invalid_character_in_isbn(self):
     self.assertIs(verify("3-598-P1581-X"), False)
Ejemplo n.º 37
0
 def test_valid_isbn_number(self):
     self.assertIs(verify('3-598-21508-8'), True)
Ejemplo n.º 38
0
 def test_invalid_character_in_isbn(self):
     self.assertIs(verify('3-598-P1581-X'), False)