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')
def dehydrate_multiday(self, bundle): """Return True if event is multiday, False otherwise.""" return is_multiday(bundle.obj.local_start, bundle.obj.local_end)