Beispiel #1
0
 def test_invalid_code(self):
     leader = "00000cam a2200000Ia 4500"
     tag_008 = tag_008 = "961120s1988    nyu    x      000 i eng d"
     self.assertIsNone(parsers.map_bib_audience_code(leader, tag_008))
Beispiel #2
0
 def test_juvenile_code_c(self):
     leader = "00000cam a2200000Ia 4500"
     tag_008 = tag_008 = "961120s1988    nyu    c      000 i eng d"
     self.assertEqual(parsers.map_bib_audience_code(leader, tag_008), "j")
Beispiel #3
0
 def test_young_adult(self):
     leader = "00000cam a2200000Ia 4500"
     tag_008 = tag_008 = "961120s1988    nyu    d      000 i eng d"
     self.assertEqual(parsers.map_bib_audience_code(leader, tag_008), "y")
Beispiel #4
0
 def test_adult_code_empty(self):
     leader = "00000cam a2200000Ia 4500"
     tag_008 = tag_008 = "961120s1988    nyu           000 i eng d"
     self.assertEqual(parsers.map_bib_audience_code(leader, tag_008), "a")
Beispiel #5
0
 def test_no_tag_008(self):
     leader = "00000cam a2200000Ia 4500"
     self.assertIsNone(parsers.map_bib_audience_code(leader, None))
Beispiel #6
0
 def test_None(self):
     self.assertIsNone(parsers.map_bib_audience_code(None, None))