コード例 #1
0
    def test_interfaces(self):
        self.failUnless(IXMBooking.implementedBy(Booking))
        self.failUnless(IXMBooking.providedBy(Booking('blah')))

        self.failUnless(IXMIteration.implementedBy(Iteration))
        self.failUnless(IXMIteration.providedBy(Iteration('blah')))

        self.failUnless(IXMOffer.implementedBy(Offer))
        self.failUnless(IXMOffer.providedBy(Offer('blah')))

        self.failUnless(IXMProject.implementedBy(Project))
        self.failUnless(IXMProject.providedBy(Project('blah')))

        self.failUnless(IXMStory.implementedBy(Story))
        self.failUnless(IXMStory.providedBy(Story('blah')))

        self.failUnless(IXMTask.implementedBy(Task))
        self.failUnless(IXMTask.providedBy(Task('blah')))

        # BBB can be removed in release 2.1
        self.failUnless(IXMCustomer.implementedBy(Customer))
        self.failUnless(IXMCustomer.providedBy(Customer('blah')))

        self.failUnless(IXMCustomerFolder.implementedBy(CustomerFolder))
        self.failUnless(IXMCustomerFolder.providedBy(CustomerFolder('blah')))

        self.failUnless(IXMProjectFolder.implementedBy(ProjectFolder))
        self.failUnless(IXMProjectFolder.providedBy(ProjectFolder('blah')))

        self.failUnless(IXMProjectMember.implementedBy(ProjectMember))
        self.failUnless(IXMProjectMember.providedBy(ProjectMember('blah')))
コード例 #2
0
 def update_task_viewlets(self):
     """Refresh task viewlets.
     """
     if IXMTask.providedBy(self.context):
         # only do this if the context is actually a task.
         zope = self.view.getCommandSet('zope')
         zope.refreshViewlet('#add-booking', 'plone.belowcontentbody',
                             'xm.add_booking_form')
コード例 #3
0
 def update_task_viewlets(self):
     """Refresh task viewlets.
     """
     if IXMTask.providedBy(self.context):
         # only do this if the context is actually a task.
         zope = self.view.getCommandSet('zope')
         zope.refreshViewlet('#add-booking', 'plone.belowcontentbody',
                             'xm.add_booking_form')