Beispiel #1
0
 def test_empty_recurrence(self, cal_vdir):
     cal, vdir = cal_vdir
     cal.new(cal.new_event(dedent(
         u'BEGIN:VEVENT\r\n'
         u'UID:no_recurrences\r\n'
         u'SUMMARY:No recurrences\r\n'
         u'RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1\r\n'
         u'EXDATE:20110908T130000\r\n'
         u'EXDATE:20110909T130000\r\n'
         u'DTSTART:20110908T130000\r\n'
         u'DTEND:20110908T170000\r\n'
         u'END:VEVENT\r\n'
     )))
     assert 'no events' in '\n'.join(get_agenda(
         cal, locale,
         dates=[datetime.date(2011, 9, 8),
                datetime.date(2011, 9, 9)]
     )).lower()
Beispiel #2
0
 def test_empty_recurrence(self, coll_vdirs):
     coll, vidrs = coll_vdirs
     coll.new(coll.new_event(dedent(
         'BEGIN:VEVENT\r\n'
         'UID:no_recurrences\r\n'
         'SUMMARY:No recurrences\r\n'
         'RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1\r\n'
         'EXDATE:20110908T130000\r\n'
         'EXDATE:20110909T130000\r\n'
         'DTSTART:20110908T130000\r\n'
         'DTEND:20110908T170000\r\n'
         'END:VEVENT\r\n'
     ), aux.cal1))
     assert 'no events' in '\n'.join(get_agenda(
         coll, aux.locale,
         dates=[datetime.date(2011, 9, 8),
                datetime.date(2011, 9, 9)]
     )).lower()
Beispiel #3
0
 def test_empty_recurrence(self, coll_vdirs):
     coll, vidrs = coll_vdirs
     coll.new(
         coll.new_event(
             dedent('BEGIN:VEVENT\r\n'
                    'UID:no_recurrences\r\n'
                    'SUMMARY:No recurrences\r\n'
                    'RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1\r\n'
                    'EXDATE:20110908T130000\r\n'
                    'EXDATE:20110909T130000\r\n'
                    'DTSTART:20110908T130000\r\n'
                    'DTEND:20110908T170000\r\n'
                    'END:VEVENT\r\n'), aux.cal1))
     assert 'no events' in '\n'.join(
         get_agenda(
             coll,
             aux.locale,
             dates=[datetime.date(2011, 9, 8),
                    datetime.date(2011, 9, 9)])).lower()
Beispiel #4
0
 def test_new_event(self, cal_vdir):
     cal, vdir = cal_vdir
     event = cal.new_event(event_today, **KWARGS)
     cal.new(event)
     assert ['\x1b[1mToday:\x1b[0m', 'a meeting'] == \
         get_agenda(cal, dateformat, longdateformat)
Beispiel #5
0
 def test_new_event(self, cal_vdir):
     cal, vdir = cal_vdir
     event = cal.new_event(event_today)
     cal.new(event)
     assert ['\x1b[1mToday:\x1b[0m', 'a meeting'] == \
         get_agenda(cal, locale)
Beispiel #6
0
 def test_new_event(self, coll_vdirs):
     coll, vdirs = coll_vdirs
     event = coll.new_event(event_today, aux.cal1)
     coll.new(event)
     assert ['\x1b[1mToday:\x1b[0m',
             '\x1b[34ma meeting\x1b[0m'] == get_agenda(coll, aux.locale)
Beispiel #7
0
 def test_new_event(self, cal_vdir):
     cal, vdir = cal_vdir
     event = cal.new_event(event_today)
     cal.new(event)
     assert ['\x1b[1mToday:\x1b[0m', 'a meeting'] == \
         get_agenda(cal, locale)
Beispiel #8
0
 def test_new_event(self, coll_vdirs):
     coll, vdirs = coll_vdirs
     event = coll.new_event(event_today, aux.cal1)
     coll.new(event)
     assert ['\x1b[1mToday:\x1b[0m', '\x1b[34ma meeting\x1b[0m'] == get_agenda(coll, aux.locale)