def test_agenda(PatchedGCalI): assert PatchedGCalI().AgendaQuery() == 0 opts = get_start_end_parser().parse_args(['tomorrow']) assert PatchedGCalI().AgendaQuery(start=opts.start, end=opts.end) == 0 opts = get_start_end_parser().parse_args(['today', 'tomorrow']) assert PatchedGCalI().AgendaQuery(start=opts.start, end=opts.end) == 0