Beispiel #1
0
 def test_add_subfield(self):
     field = Field(tag="245", indicators=[0, 1], subfields=["a", "foo"])
     field.add_subfield("a", "bar")
     self.assertEqual(field.__str__(), "=245  01$afoo$abar")
     field.add_subfield("b", "baz", 0)
     self.assertEqual(field.__str__(), "=245  01$bbaz$afoo$abar")
     field.add_subfield("c", "qux", 2)
     self.assertEqual(field.__str__(), "=245  01$bbaz$afoo$cqux$abar")
     field.add_subfield("z", "wat", 8)
     self.assertEqual(field.__str__(), "=245  01$bbaz$afoo$cqux$abar$zwat")
Beispiel #2
0
 def test_add_subfield(self):
     field = Field(tag='245', indicators=[0, 1], subfields=['a', 'foo'])
     field.add_subfield('a', 'bar')
     self.assertEqual(field.__str__(), '=245  01$afoo$abar')
     field.add_subfield('b', 'baz', 0)
     self.assertEqual(field.__str__(), '=245  01$bbaz$afoo$abar')
     field.add_subfield('c', 'qux', 2)
     self.assertEqual(field.__str__(), '=245  01$bbaz$afoo$cqux$abar')
     field.add_subfield('z', 'wat', 8)
     self.assertEqual(field.__str__(), '=245  01$bbaz$afoo$cqux$abar$zwat')
Beispiel #3
0
 def test_add_subfield(self):
     field = Field(tag='245', indicators=[0, 1], subfields=['a', 'foo'])
     field.add_subfield('a', 'bar')
     self.assertEqual(field.__str__(), '=245  01$afoo$abar')
Beispiel #4
0
 def test_add_subfield(self):
     field = Field(tag='245', indicators=[0, 1], subfields=['a', 'foo'])
     field.add_subfield('a','bar')
     self.assertEquals(field.__str__(), '=245  01$afoo$abar')