Пример #1
0
    def test_is_multiday(self):
        """Test is_multiday filter."""
        e = EventFactory.create()
        ok_(is_multiday(e.start, e.end), 'Multiday event validates to False')

        e = EventFactory.create(start=START_DT, end=self.single_day_end)
        ok_(not is_multiday(e.start, e.end),
            'Single day event validates to True')
Пример #2
0
    def test_is_multiday(self):
        """Test is_multiday filter."""
        e = EventFactory.create()
        ok_(is_multiday(e.start, e.end), 'Multiday event validates to False')

        e = EventFactory.create(start=START_DT, end=self.single_day_end)
        ok_(not is_multiday(e.start, e.end),
            'Single day event validates to True')
Пример #3
0
 def dehydrate_multiday(self, bundle):
     """Return True if event is multiday, False otherwise."""
     return is_multiday(bundle.obj.local_start, bundle.obj.local_end)
Пример #4
0
 def dehydrate_multiday(self, bundle):
     """Return True if event is multiday, False otherwise."""
     return is_multiday(bundle.obj.local_start, bundle.obj.local_end)