def test_json_save(self): # This class is used to save a document using json. Let's try and set some value. document = self.folder_object.invokeFactory('Document', id='document') obj = ISave(self.folder_object[document]) obj.save(fieldname='text', text='<p>test</p>') # The document should now contain our new text. self.assertEqual(self.folder_object[self.document].getText(), '<p>test</p>')
def save(self, text, fieldname): """Saves the specified richedit field""" object = ISave(self.context) return object.save(text, fieldname)