def trigger(self): if self.fixed_trigger is not None: return self.fixed_trigger elif self.delta is not None and self.item is not None: if Event.installed_on(self.item): start = Event(self.item).start if start is not None: return start + self.delta
def _after_import_tests(self): item = get_item_for_uuid(self.event_uuid) work_collection = get_item_for_uuid(self.work_collection_uuid) self.assertEqual(len(work_collection.items), 3) self._find_sidebar_entry(work_collection) self.assertEqual(tuple(item.collections), (work_collection,) ) self.assertNotEqual(item, None) self.assertEqual(item.title, 'Office supplies order') self.assert_(Event.installed_on(item)) self.assertEqual(Event(item).start, self.jan_ninth) self.assert_(Event(item).any_time) self.failIf(Event(item).all_day)
def is_event(self): return Event.installed_on(self._item)