def setUp(self): super(AttributionTests, self).setUp() self.root = placefulSetUp(True) setUpZCML(self) hooks.setSite(self.root) # we need a transaction from zope.security.management import newInteraction interaction = newInteraction() testing.generateCategorizableItemDescriptions(self.root) testing.generateCategoriesContainer(self.root) testing.setUpIntIds(self) testing.setUpIndices(self) testing.setUpRelationCatalog(self) from quotationtool.workflow import testing as workflowtesting workflowtesting.setUpWorkLists(self.root) workflowtesting.setUpIndices(self) from quotationtool.workflow.interfaces import IWorkList self.editor_items = zope.component.getUtility(IWorkList, name='editor', context=self.root) self.contributor_items = zope.component.getUtility(IWorkList, name='contributor', context=self.root) # create item and its intid from quotationtool.workflow.interfaces import IHasWorkflowHistory zope.interface.classImplements(testing.Categorizable, IHasWorkflowHistory) self.root['item'] = item = testing.Categorizable() from zope.intid.interfaces import IIntIds self.intids = zope.component.getUtility(IIntIds, context=self.root) self.intids.register(self.root['item'])
def setUp(self): super(WorkItemTests, self).setUp() setUpZCML(self) setUpIntIds(self) setUpRelationCatalog(self) self.root = rootFolder() testing.setUpWorkLists(self.root) testing.setUpIndices(self) generateContent(self.root) from quotationtool.workflow.interfaces import IWorkList self.worklist = zope.component.getUtility(IWorkList, name='editor', context=self.root)
def setUp(self): super(ReclassificationTests, self).setUp() self.root = placefulSetUp(True) setUpZCML(self) hooks.setSite(self.root) testing.setUpIntIds(self) testing.setUpIndices(self) testing.setUpRelationCatalog(self) interaction = newInteraction() # needed for generation of categories testing.generateCategorizableItemDescriptions(self.root) testing.generateCategoriesContainer(self.root) from quotationtool.workflow import testing as workflowtesting workflowtesting.setUpWorkLists(self.root) workflowtesting.setUpIndices(self) from quotationtool.workflow.interfaces import IWorkList self.editor_items = zope.component.getUtility(IWorkList, name='editor', context=self.root) self.contributor_items = zope.component.getUtility(IWorkList, name='contributor', context=self.root) self.item = self.root['item'] = testing.Categorizable() attr = interfaces.IAttribution(self.item) attr.set(('cat12', 'cat22', 'cat32'))
def setUp(self): super(ListWorkListsTests, self).setUp() setUpZCML(self) self.root = rootFolder() testing.setUpWorkLists(self.root)