示例#1
0
文件: record.py 项目: gsf/pymarc
 def test_added_entries(self):
     record = Record()
     ae1 = "=730  0\\$aTosefta.$lEnglish.$f1977."
     ae2 = "=700  10$aLe Peu, Pepe."
     aelist = [ae1, ae2]
     self.assertEquals(record.addedentries(), [])
     record.add_field(Field("730", [0, " "], subfields=["a", "Tosefta.", "l", "English.", "f", "1977."]))
     record.add_field(Field("700", [1, 0], subfields=["a", "Le Peu, Pepe."]))
     record.add_field(Field("245", [0, 0], subfields=["a", "Le Peu's Tosefa."]))
     self.assertEquals(len(record.addedentries()), 2)
     self.assertEquals(record.addedentries()[0].__str__(), ae1)
     self.assertEquals(record.addedentries()[1].__str__(), ae2)
     raelist = [rae.__str__() for rae in record.addedentries()]
     self.assertEquals(aelist, raelist)
示例#2
0
 def test_added_entries(self):
     record = Record()
     ae1 = '=730  0\\$aTosefta.$lEnglish.$f1977.'
     ae2 = '=700  10$aLe Peu, Pepe.'
     aelist = [ae1, ae2]
     self.assertEqual(record.addedentries(), [])
     record.add_field(Field('730', [0, ' '],
         subfields=['a', "Tosefta.", 'l', "English.", 'f', "1977."]))
     record.add_field(Field('700', [1, 0],
         subfields=['a', "Le Peu, Pepe."]))
     record.add_field(Field('245', [0, 0],
         subfields=['a', "Le Peu's Tosefa."]))
     self.assertEqual(len(record.addedentries()), 2)
     self.assertEqual(record.addedentries()[0].__str__(), ae1)
     self.assertEqual(record.addedentries()[1].__str__(), ae2)
     raelist = [rae.__str__() for rae in record.addedentries()]
     self.assertEqual(aelist, raelist)
示例#3
0
文件: record.py 项目: acdha/pymarc
 def test_added_entries(self):
     record = Record()
     ae1 = '=730  0\\$aTosefta.$lEnglish.$f1977.'
     ae2 = '=700  10$aLe Peu, Pepe.'
     aelist = [ae1, ae2]
     self.assertEqual(record.addedentries(), [])
     record.add_field(Field('730', [0, ' '], 
         subfields=['a', "Tosefta.", 'l', "English.", 'f', "1977."]))
     record.add_field(Field('700', [1, 0], 
         subfields=['a', "Le Peu, Pepe."]))
     record.add_field(Field('245', [0, 0],
         subfields=['a', "Le Peu's Tosefa."]))
     self.assertEqual(len(record.addedentries()), 2)
     self.assertEqual(record.addedentries()[0].__str__(), ae1)
     self.assertEqual(record.addedentries()[1].__str__(), ae2)
     raelist = [rae.__str__() for rae in record.addedentries()]
     self.assertEqual(aelist, raelist)
示例#4
0
 def test_added_entries(self):
     record = Record()
     ae1 = "=730  0\\$aTosefta.$lEnglish.$f1977."
     ae2 = "=700  10$aLe Peu, Pepe."
     aelist = [ae1, ae2]
     self.assertEqual(record.addedentries(), [])
     record.add_field(
         Field(
             "730",
             [0, " "],
             subfields=["a", "Tosefta.", "l", "English.", "f", "1977."],
         ))
     record.add_field(Field("700", [1, 0], subfields=["a",
                                                      "Le Peu, Pepe."]))
     record.add_field(
         Field("245", [0, 0], subfields=["a", "Le Peu's Tosefa."]))
     self.assertEqual(len(record.addedentries()), 2)
     self.assertEqual(record.addedentries()[0].__str__(), ae1)
     self.assertEqual(record.addedentries()[1].__str__(), ae2)
     raelist = [rae.__str__() for rae in record.addedentries()]
     self.assertEqual(aelist, raelist)