Beispiel #1
0
 def test_add_field(self):
     field = TextField("foo", field_uri="bar")
     Item.add_field(field, insert_after="subject")
     try:
         self.assertEqual(Item.get_field_by_fieldname("foo"), field)
     finally:
         Item.remove_field(field)
Beispiel #2
0
 def test_add_field(self):
     field = TextField('foo', field_uri='bar')
     Item.add_field(field, insert_after='subject')
     try:
         self.assertEqual(Item.get_field_by_fieldname('foo'), field)
     finally:
         Item.remove_field(field)