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)
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)