Пример #1
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='plone.app.event.dx.event')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IDXEvent.providedBy(new_object))
     self.assertTrue(IDXEventRecurrence.providedBy(new_object))
     self.assertTrue(IEventLocation.providedBy(new_object))
     self.assertTrue(IEventAttendees.providedBy(new_object))
     self.assertTrue(IEventContact.providedBy(new_object))
Пример #2
0
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='plone.app.event.dx.event')
     factory = fti.factory
     new_object = createObject(factory)
     self.assertTrue(IDXEvent.providedBy(new_object))
     self.assertTrue(IDXEventRecurrence.providedBy(new_object))
     self.assertTrue(IEventLocation.providedBy(new_object))
     self.assertTrue(IEventAttendees.providedBy(new_object))
     self.assertTrue(IEventContact.providedBy(new_object))
Пример #3
0
 def test_adding(self):
     self.portal.invokeFactory(
         'plone.app.event.dx.event',
         'event1',
         start=datetime(2011, 11, 11, 11, 0),
         end=datetime(2011, 11, 11, 12, 0),
         timezone=TZNAME,
         whole_day=False
     )
     e1 = self.portal['event1']
     self.assertTrue(IDXEvent.providedBy(e1))
     self.assertTrue(IDXEventRecurrence.providedBy(e1))
     self.assertTrue(IEventLocation.providedBy(e1))
     self.assertTrue(IEventAttendees.providedBy(e1))
     self.assertTrue(IEventContact.providedBy(e1))
Пример #4
0
    def test_adding(self):
        self.portal.invokeFactory(
            'plone.app.event.dx.event',
            'event1',
            start=datetime(2011, 11, 11, 11, 0),
            end=datetime(2011, 11, 11, 12, 0),
            timezone=TZNAME,
            whole_day=False
        )
        e1 = self.portal['event1']
        self.assertTrue(IDXEvent.providedBy(e1))
        self.assertTrue(IDXEventRecurrence.providedBy(e1))
        self.assertTrue(IEventLocation.providedBy(e1))
        self.assertTrue(IEventAttendees.providedBy(e1))
        self.assertTrue(IEventContact.providedBy(e1))

        self.portal.manage_delObjects(['event1'])