def test_create_dynaitem(self):
     self.portal.invokeFactory('collective.dynapage', id='dynapage',
                               title=u'Dynapage')
     obj = self.portal['dynapage']
     obj.invokeFactory('collective.dynaitem.collection', id='collection',
                       title=u'Collection')
     self.assertTrue('collection' in obj.objectIds())
     collection = obj['collection']
     self.failUnless(IDynaCollection.providedBy(collection))
     self.failUnless(IDynaItem.providedBy(collection))
     self.failUnless(IDynaItemPosition.providedBy(collection))
     self.failUnless(IListsItem.providedBy(collection))
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='collective.dynaitem.collection')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IDynaCollection.providedBy(new_object))