def test_nypl_research_full_no_order(self): tag = Field(tag="852", indicators=["8", " "], subfields=["h", "ReCAP 0001"]) self.n_marc.add_ordered_field(tag) meta = bibs.InhouseBibMeta(self.n_marc) self.assertEqual(meta.ownLibrary, "research")
def test_bpl_ownLibrary_full(self): tag = Field(tag="099", indicators=[" ", " "], subfields=["a", "FIC", "a", "ADAMS"]) self.b_marc.add_ordered_field(tag) meta = bibs.InhouseBibMeta(self.b_marc) self.assertEqual(meta.ownLibrary, "branches")
def test_nypl_branch_full_no_order(self): tag = Field(tag="091", indicators=[" ", " "], subfields=["f", "FIC", "a", "ADAMS"]) self.n_marc.add_ordered_field(tag) meta = bibs.InhouseBibMeta(self.n_marc) self.assertEqual(meta.ownLibrary, "branches")
def test_nypl_mixed_branch_full_research_order(self): tag = Field(tag="091", indicators=[" ", " "], subfields=["f", "FIC", "a", "ADAMS"]) self.n_marc.add_ordered_field(tag) locs = ["xxx"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "mixed")
def test_nypl_mixed_research_full_branch_order(self): tag = Field(tag="852", indicators=["8", " "], subfields=["h", "ReCAP 0001"]) self.n_marc.add_ordered_field(tag) locs = ["zzzzz"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "mixed")
def test_nypl_mixed_full_no_order(self): tag = Field(tag="852", indicators=["8", " "], subfields=["h", "ReCAP 0001"]) self.n_marc.add_ordered_field(tag) tag = Field(tag="091", indicators=[" ", " "], subfields=["f", "FIC", "a", "ADAMS"]) self.n_marc.add_ordered_field(tag) meta = bibs.InhouseBibMeta(self.n_marc) self.assertEqual(meta.ownLibrary, "mixed")
def test_bpl_ownLibrary_order(self): meta = bibs.InhouseBibMeta(self.b_marc) self.assertIsNone(meta.ownLibrary)
def test_nypl_ownLibrary_research_sc_loc(self): locs = ["sc"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "research")
def test_nypl_ownLibrary_research_my_locs(self): locs = ["myd", "myh", "mym", "myt"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "research")
def test_nypl_ownLibrary_branches_my_locs(self): locs = ["mya0n", "mya0v", "myj0f"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "branches")
def test_nypl_ownLibrary_branch_locs_only(self): locs = sierra_dicts.NYPL_BRANCHES.keys() locs.remove("ma") locs.remove("sc") meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "branches")
def test_nypl_ownLibrary_mixed_explicit_ma(self): locs = ["mya0n", "mal"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "mixed")
def test_nypl_ownLibrary_mixed_order(self): locs = ["zzzzz", "xxx"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "mixed")
def test_nypl_ownLibrary_zzzzz(self): locs = ["zzzzz"] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertEqual(meta.ownLibrary, "branches")
def test_nypl_ownLibrary_no_locations(self): locs = [] meta = bibs.InhouseBibMeta(self.n_marc, locations=locs) self.assertIsNone(meta.ownLibrary)