def test_empty_string_parsing(self): self.assertIsNone(bibs.parse_sierra_id(""))
def test_None_id_parsing(self): self.assertIsNone(bibs.parse_sierra_id(None))
def test_order_number_parsing(self): self.assertIsNotNone(bibs.parse_sierra_id(".o16799069")) self.assertEqual(bibs.parse_sierra_id(".o16799069"), "1679906")
def test_wrong_id_number_parsing(self): self.assertIsNone(bibs.parse_sierra_id("349876789087"))
def test_bib_number_parsing(self): self.assertIsNotNone(bibs.parse_sierra_id(".b119629811")) self.assertEqual(bibs.parse_sierra_id(".b119629811"), "11962981")