def test_weekly_tue(self): """Repeat every week on Tuesday.""" vrecurr = utils.build_rrule(freq='WEEKLY', byday='TU') assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['BYDAY'] == 'TU' vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYDAY=TU' assert len(vrecurr.keys()) == 2
def test_every_2_weeks(self): """Repeat every 2 weeks.""" vrecurr = utils.build_rrule(interval=2, freq='WEEKLY') assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['INTERVAL'] == 2 vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;INTERVAL=2' assert len(vrecurr.keys()) == 2
def test_ever_month_last_day(self): """Repeat the last day of each month.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=-1') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [-1] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-1' assert len(vrecurr.keys()) == 2
def test_weekly_by_weekday(self): rule = rrule(WEEKLY, count=3, byweekday=(TU, TH), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=3;BYDAY=TU,TH'
def test_every_6_months(self): """Repeat very 6 months.""" vrecurr = utils.build_rrule_from_text('INTERVAL=6;FREQ=MONTHLY') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['INTERVAL'] == [6] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;INTERVAL=6' assert len(vrecurr.keys()) == 2
def test_every_week_20_times(self): """Repeat every week for 20 times.""" vrecurr = utils.build_rrule_from_text('FREQ=WEEKLY;COUNT=20') assert vrecurr['FREQ'] == ['WEEKLY'] assert vrecurr['COUNT'] == [20] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=20' assert len(vrecurr.keys()) == 2
def test_every_2_weeks(self): """Repeat every 2 weeks.""" vrecurr = utils.build_rrule(interval=2, freq="WEEKLY") assert vrecurr["FREQ"] == "WEEKLY" assert vrecurr["INTERVAL"] == 2 vRecur(vrecurr).to_ical().decode() == "FREQ=WEEKLY;INTERVAL=2" assert len(vrecurr.keys()) == 2
def test_every_week_20_times(self): """Repeat every week for 20 times.""" vrecurr = utils.build_rrule(freq='WEEKLY', count=20) assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['COUNT'] == 20 vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=20' assert len(vrecurr.keys()) == 2
def test_weekly_tue(self): """Repeat every week on Tuesday.""" vrecurr = utils.build_rrule(freq="WEEKLY", byday="TU") assert vrecurr["FREQ"] == "WEEKLY" assert vrecurr["BYDAY"] == "TU" vRecur(vrecurr).to_ical().decode() == "FREQ=WEEKLY;BYDAY=TU" assert len(vrecurr.keys()) == 2
def test_weekly_mo_wed(self): """Repeat every week on Monday, Wednesday.""" vrecurr = utils.build_rrule(freq="WEEKLY", byday=["MO", "WE"]) assert vrecurr["FREQ"] == "WEEKLY" assert vrecurr["BYDAY"] == ["MO", "WE"] vRecur(vrecurr).to_ical().decode() == "FREQ=WEEKLY;BYDAY=MO,WE" assert len(vrecurr.keys()) == 2
def test_ever_4_hours(self): """Repeat every 4 hours.""" vrecurr = utils.build_rrule(interval=4, freq="HOURLY") assert vrecurr["FREQ"] == "HOURLY" assert vrecurr["INTERVAL"] == 4 vRecur(vrecurr).to_ical().decode() == "FREQ=HOURLY;INTERVAL=4" assert len(vrecurr.keys()) == 2
def test_every_2nd_15th_of_month(self): """Repeat monthly on the 2nd and 15th of the month.""" vrecurr = utils.build_rrule_from_text("FREQ=MONTHLY;BYMONTHDAY=4,15") assert vrecurr["FREQ"] == ["MONTHLY"] assert vrecurr["BYMONTHDAY"] == [4, 15] vRecur(vrecurr).to_ical().decode() == "FREQ=MONTHLY;BYMONTHDAY=4,15" assert len(vrecurr.keys()) == 2
def test_ever_month_last_day(self): """Repeat the last day of each month.""" vrecurr = utils.build_rrule_from_text("FREQ=MONTHLY;BYMONTHDAY=-1") assert vrecurr["FREQ"] == ["MONTHLY"] assert vrecurr["BYMONTHDAY"] == [-1] vRecur(vrecurr).to_ical().decode() == "FREQ=MONTHLY;BYMONTHDAY=-1" assert len(vrecurr.keys()) == 2
def test_every_6_months(self): """Repeat very 6 months.""" vrecurr = utils.build_rrule(interval=6, freq='MONTHLY') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['INTERVAL'] == 6 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;INTERVAL=6' assert len(vrecurr.keys()) == 2
def test_every_6_months(self): """Repeat very 6 months.""" vrecurr = utils.build_rrule(interval=6, freq='MONTHLY') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['INTERVAL'] == 6 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;INTERVAL=6' assert len(vrecurr.keys()) == 2
def test_ever_month_3rd_tu(self): """Repeat every month on the 3rd Tuesday.""" vrecurr = utils.build_rrule(freq='MONTHLY', byday='+3TU') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYDAY'] == '+3TU' vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=+3TU' assert len(vrecurr.keys()) == 2
def test_every_month_on_the_4th_last(self): """Repeat every month on the 4th last.""" vrecurr = utils.build_rrule(freq='MONTHLY', bymonthday=-4) assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYMONTHDAY'] == -4 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-4' assert len(vrecurr.keys()) == 2
def test_ever_4_hours(self): """Repeat every 4 hours.""" vrecurr = utils.build_rrule_from_text('INTERVAL=4;FREQ=HOURLY') assert vrecurr['FREQ'] == ['HOURLY'] assert vrecurr['INTERVAL'] == [4] vRecur(vrecurr).to_ical().decode() == 'FREQ=HOURLY;INTERVAL=4' assert len(vrecurr.keys()) == 2
def test_ever_month_3rd_tu(self): """Repeat every month on the 3rd Tuesday.""" vrecurr = utils.build_rrule(freq='MONTHLY', byday='+3TU') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYDAY'] == '+3TU' vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=+3TU' assert len(vrecurr.keys()) == 2
def test_ever_month_3rd_last_tu(self): """Repeat every month on the 3rd last Tuesday.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYDAY=-3TU') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYDAY'] == ['-3TU'] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-3TU' assert len(vrecurr.keys()) == 2
def test_ever_month_last_mo(self): """Repeat every month on the last Monday.""" vrecurr = utils.build_rrule(freq='MONTHLY', byday='-1MO') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYDAY'] == '-1MO' vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-1MO' assert len(vrecurr.keys()) == 2
def test_ever_month_last_day(self): """Repeat the last day of each month.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=-1') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [-1] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-1' assert len(vrecurr.keys()) == 2
def test_every_week_20_times(self): """Repeat every week for 20 times.""" vrecurr = utils.build_rrule(freq='WEEKLY', count=20) assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['COUNT'] == 20 vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=20' assert len(vrecurr.keys()) == 2
def test_every_2nd_15th_of_month(self): """Repeat monthly on the 2nd and 15th of the month.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=4,15') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [4, 15] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=4,15' assert len(vrecurr.keys()) == 2
def test_ever_month_last_day(self): """Repeat the last day of each month.""" vrecurr = utils.build_rrule(freq='MONTHLY', bymonthday=-1) assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYMONTHDAY'] == -1 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-1' assert len(vrecurr.keys()) == 2
def test_ever_4_hours(self): """Repeat every 4 hours.""" vrecurr = utils.build_rrule(interval=4, freq='HOURLY') assert vrecurr['FREQ'] == 'HOURLY' assert vrecurr['INTERVAL'] == 4 vRecur(vrecurr).to_ical().decode() == 'FREQ=HOURLY;INTERVAL=4' assert len(vrecurr.keys()) == 2
def test_ever_4_hours(self): """Repeat every 4 hours.""" vrecurr = utils.build_rrule_from_text('INTERVAL=4;FREQ=HOURLY') assert vrecurr['FREQ'] == ['HOURLY'] assert vrecurr['INTERVAL'] == [4] vRecur(vrecurr).to_ical().decode() == 'FREQ=HOURLY;INTERVAL=4' assert len(vrecurr.keys()) == 2
def test_weekly_mo_wed(self): """Repeat every week on Monday, Wednesday.""" vrecurr = utils.build_rrule(freq='WEEKLY', byday=['MO', 'WE']) assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['BYDAY'] == ['MO', 'WE'] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYDAY=MO,WE' assert len(vrecurr.keys()) == 2
def test_daily_byhour(self): """Repeat every day at 10, 12 and 17.""" vrecurr = utils.build_rrule(freq='DAILY', byhour=[10, 12, 17]) assert vrecurr['FREQ'] == 'DAILY' assert vrecurr['BYHOUR'] == [10, 12, 17] vRecur(vrecurr).to_ical().decode() == 'FREQ=DAILY;BYHOUR=10,12,17' assert len(vrecurr.keys()) == 2
def test_every_week_20_times(self): """Repeat every week for 20 times.""" vrecurr = utils.build_rrule_from_text("FREQ=WEEKLY;COUNT=20") assert vrecurr["FREQ"] == ["WEEKLY"] assert vrecurr["COUNT"] == [20] vRecur(vrecurr).to_ical().decode() == "FREQ=WEEKLY;COUNT=20" assert len(vrecurr.keys()) == 2
def test_every_2_weeks(self): """Repeat every 2 weeks.""" vrecurr = utils.build_rrule_from_text('INTERVAL=2;FREQ=WEEKLY') assert vrecurr['FREQ'] == ['WEEKLY'] assert vrecurr['INTERVAL'] == [2] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;INTERVAL=2' assert len(vrecurr.keys()) == 2
def test_every_month_on_the_4th_last(self): """Repeat every month on the 4th last.""" vrecurr = utils.build_rrule(freq='MONTHLY', bymonthday=-4) assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYMONTHDAY'] == -4 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-4' assert len(vrecurr.keys()) == 2
def test_every_6_months(self): """Repeat very 6 months.""" vrecurr = utils.build_rrule_from_text('INTERVAL=6;FREQ=MONTHLY') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['INTERVAL'] == [6] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;INTERVAL=6' assert len(vrecurr.keys()) == 2
def test_ever_month_last_mo(self): """Repeat every month on the last Monday.""" vrecurr = utils.build_rrule(freq='MONTHLY', byday='-1MO') assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYDAY'] == '-1MO' vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-1MO' assert len(vrecurr.keys()) == 2
def test_every_month_on_the_4th_last(self): """Repeat every month on the 4th last.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=-4') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [-4] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-4' assert len(vrecurr.keys()) == 2
def test_ever_month_last_day(self): """Repeat the last day of each month.""" vrecurr = utils.build_rrule(freq='MONTHLY', bymonthday=-1) assert vrecurr['FREQ'] == 'MONTHLY' assert vrecurr['BYMONTHDAY'] == -1 vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-1' assert len(vrecurr.keys()) == 2
def test_ever_month_3rd_last_tu(self): """Repeat every month on the 3rd last Tuesday.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYDAY=-3TU') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYDAY'] == ['-3TU'] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-3TU' assert len(vrecurr.keys()) == 2
def test_every_2_weeks(self): """Repeat every 2 weeks.""" vrecurr = utils.build_rrule_from_text('INTERVAL=2;FREQ=WEEKLY') assert vrecurr['FREQ'] == ['WEEKLY'] assert vrecurr['INTERVAL'] == [2] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;INTERVAL=2' assert len(vrecurr.keys()) == 2
def test_ever_month_second_last_fr(self): """Repeat every month on the 2nd last Friday.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYDAY=-2FR') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYDAY'] == ['-2FR'] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-2FR' assert len(vrecurr.keys()) == 2
def test_every_month_on_the_4th_last(self): """Repeat every month on the 4th last.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=-4') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [-4] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=-4' assert len(vrecurr.keys()) == 2
def test_daily_byhour_once(self): """Repeat every day at 10.""" vrecurr = utils.build_rrule(freq='DAILY', byhour=10) assert vrecurr['FREQ'] == 'DAILY' assert vrecurr['BYHOUR'] == 10 vRecur(vrecurr).to_ical().decode() == 'FREQ=DAILY;BYHOUR=10' assert len(vrecurr.keys()) == 2
def test_ever_month_second_last_fr(self): """Repeat every month on the 2nd last Friday.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYDAY=-2FR') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYDAY'] == ['-2FR'] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=-2FR' assert len(vrecurr.keys()) == 2
def test_every_week_20_times(self): """Repeat every week for 20 times.""" vrecurr = utils.build_rrule_from_text('FREQ=WEEKLY;COUNT=20') assert vrecurr['FREQ'] == ['WEEKLY'] assert vrecurr['COUNT'] == [20] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=20' assert len(vrecurr.keys()) == 2
def test_daily_byhour(self): """Repeat every day at 10, 12 and 17.""" vrecurr = utils.build_rrule(freq='DAILY', byhour=[10, 12, 17]) assert vrecurr['FREQ'] == 'DAILY' assert vrecurr['BYHOUR'] == [10, 12, 17] vRecur(vrecurr).to_ical().decode() == 'FREQ=DAILY;BYHOUR=10,12,17' assert len(vrecurr.keys()) == 2
def test_every_2_weeks(self): """Repeat every 2 weeks.""" vrecurr = utils.build_rrule(interval=2, freq='WEEKLY') assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['INTERVAL'] == 2 vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;INTERVAL=2' assert len(vrecurr.keys()) == 2
def test_every_weekday(self): """Repeat every weekday.""" vrecurr = utils.build_rrule(freq='WEEKLY', byday=['MO', 'TU', 'WE', 'TH', 'FR']) assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['BYDAY'] == ['MO', 'TU', 'WE', 'TH', 'FR'] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR' assert len(vrecurr.keys()) == 2
def test_daily_byhour_once(self): """Repeat every day at 10.""" vrecurr = utils.build_rrule(freq="DAILY", byhour=10) assert vrecurr["FREQ"] == "DAILY" assert vrecurr["BYHOUR"] == 10 vRecur(vrecurr).to_ical().decode() == "FREQ=DAILY;BYHOUR=10" assert len(vrecurr.keys()) == 2
def test_weekly_tue(self): """Repeat every week on Tuesday.""" vrecurr = utils.build_rrule(freq='WEEKLY', byday='TU') assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['BYDAY'] == 'TU' vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYDAY=TU' assert len(vrecurr.keys()) == 2
def test_weekly_mo_wed(self): """Repeat every week on Monday, Wednesday.""" vrecurr = utils.build_rrule(freq='WEEKLY', byday=['MO', 'WE']) assert vrecurr['FREQ'] == 'WEEKLY' assert vrecurr['BYDAY'] == ['MO', 'WE'] vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYDAY=MO,WE' assert len(vrecurr.keys()) == 2
def test_monthly_month_nweekday(self): rule = rrule(MONTHLY, bymonth=(1, 3), byweekday=(TU(1), TH(-1)), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYDAY=+1TU,-1TH;BYMONTH=1,3'
def test_ever_4_hours(self): """Repeat every 4 hours.""" vrecurr = utils.build_rrule(interval=4, freq='HOURLY') assert vrecurr['FREQ'] == 'HOURLY' assert vrecurr['INTERVAL'] == 4 vRecur(vrecurr).to_ical().decode() == 'FREQ=HOURLY;INTERVAL=4' assert len(vrecurr.keys()) == 2
def test_weekly_by_weekday(self): rule = rrule(WEEKLY, count=3, byweekday=(TU, TH), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;COUNT=3;BYDAY=TU,TH'
def test_daily_byhour_once(self): """Repeat every day at 10.""" vrecurr = utils.build_rrule(freq='DAILY', byhour=10) assert vrecurr['FREQ'] == 'DAILY' assert vrecurr['BYHOUR'] == 10 vRecur(vrecurr).to_ical().decode() == 'FREQ=DAILY;BYHOUR=10' assert len(vrecurr.keys()) == 2
def test_weekly_by_month_year_day(self): rule = rrule(WEEKLY, bymonth=(1, 7), byyearday=(1, 100, 200, 365), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=WEEKLY;BYYEARDAY=1,100,200,365;BYMONTH=1,7'
def test_every_2nd_15th_of_month(self): """Repeat monthly on the 2nd and 15th of the month.""" vrecurr = utils.build_rrule_from_text('FREQ=MONTHLY;BYMONTHDAY=4,15') assert vrecurr['FREQ'] == ['MONTHLY'] assert vrecurr['BYMONTHDAY'] == [4, 15] vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;BYMONTHDAY=4,15' assert len(vrecurr.keys()) == 2
def test_monthly_month_monthday(self): rule = rrule(MONTHLY, count=3, bymonth=(1, 3), bymonthday=(5, 7), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=MONTHLY;COUNT=3;BYMONTHDAY=5,7;BYMONTH=1,3'
def test_yearly_weekno_weekday(self): rule = rrule(YEARLY, count=3, byweekno=1, byweekday=MO, dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=YEARLY;COUNT=3;BYDAY=MO;BYWEEKNO=1'
def test_daily_by_month_nweekday(self): rule = rrule(DAILY, count=3, bymonth=(1, 3), byweekday=(TU(1), TH(-1)), dtstart=datetime.datetime(1997, 9, 2, 9, 0)) vrecurr = utils.build_rrule_from_dateutil_rrule(rule) vRecur(vrecurr).to_ical().decode() == 'FREQ=DAILY;COUNT=3;BYDAY=TU,TH;BYMONTH=1,3'
def test_every_fr_13th(self): """Repeat every Friday the 13th.""" vrecurr = utils.build_rrule_from_text('FREQ=YEARLY;BYMONTHDAY=13;BYDAY=FR') assert vrecurr['FREQ'] == ['YEARLY'] assert vrecurr['BYMONTHDAY'] == [13] assert vrecurr['BYDAY'] == ['FR'] vRecur(vrecurr).to_ical().decode() == 'FREQ=YEARLY;BYDAY=FR;BYMONTHDAY=13' assert len(vrecurr.keys()) == 3
def test_every_day_in_jan(self): """Repeat every day in January""" vrecurr = utils.build_rrule_from_text('FREQ=YEARLY;BYMONTH=1;BYDAY=MO,TU,WE,TH,FR,SA,SU;') assert vrecurr['FREQ'] == ['YEARLY'] assert vrecurr['BYMONTH'] == [1] assert vrecurr['BYDAY'] == ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] vRecur(vrecurr).to_ical().decode() == 'FREQ=YEARLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYMONTH=1' assert len(vrecurr.keys()) == 3