def testFormIsRegistered(self):
     self.loginAsManager()
     populate(self.portal)
     tool = getToolByName(self.portal, TOOL_ID)
     form = getattr(tool, FORM_ID)
     self.failUnless(IPFGExtenderForm.providedBy(form))
     registered = queryUtility(IPFGExtenderForm, EVENT_PORTAL_TYPE)
     self.assertEquals(form, registered)
 def testNoImpactOfHandlerOutsideTool(self):
     PFGFORM_ID = "pfgform"
     self.folder.invokeFactory(FormFolder.portal_type, PFGFORM_ID)
     self.failUnless(PFGFORM_ID in self.folder)
     form = getattr(self.folder, PFGFORM_ID)
     self.failIf(IPFGExtenderForm.providedBy(form))