def test_dump_data(self): doc = api.content.create( type='Document', id='doc', container=self.portal) data = content.dump_object_data(doc) self.assertEqual(json.loads(data)['uid'], IUUID(doc))
def test_dump_data_with_view(self): folder = api.content.create(type='Folder', id='file-repository', container=self.portal) doc = api.content.create(type='File', id='fi', container=folder) data = content.dump_object_data(doc) self.assertEqual(json.loads(data)['url'], doc.absolute_url() + '/view')