Example #1
0
 def test_audn_code_for_print(self):
     leader = "01451nam  22003973i 4500"
     t008 = r"961120s1988    nyu    a      000 1 eng d"
     self.assertEqual(parsers.get_audience_code(leader, t008), "a")
Example #2
0
 def test_audn_code_for_projected_medium(self):
     leader = "01451ngm  22003973i 4500"
     t008 = r"190916p20192018xxu156            vleng d"
     self.assertIsNone(parsers.get_audience_code(leader, t008))
Example #3
0
 def test_no_008_tag(self):
     leader = "01451nam  2200397 i 4500"
     t008 = None
     self.assertIsNone(parsers.get_audience_code(leader, t008))
Example #4
0
 def test_audn_code_for_lang_material(self):
     leader = "01451nam  2200397 i 4500"
     t008 = r"190911s2019    caua          000 1 eng d"
     self.assertEqual(parsers.get_audience_code(leader, t008), " ")
Example #5
0
 def test_no_record_leader(self):
     leader = None
     t008 = r"190911s2019\\\\caua\\\\\\\\\\000\1\eng\d"
     self.assertIsNone(parsers.get_audience_code(leader, t008))