예제 #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)