Inkycal/inkycal/tests/ical_parser_test.py

27 lines
692 B
Python
Raw Normal View History

2020-05-15 22:40:30 +02:00
import unittest
2020-05-29 03:58:48 +02:00
from inkycal.modules.ical_parser import iCalendar
2020-05-15 22:40:30 +02:00
import arrow
2020-05-29 03:58:48 +02:00
ical = iCalendar()
2020-05-15 22:40:30 +02:00
2020-05-16 08:15:17 +02:00
class ical_parser_test(unittest.TestCase):
2020-05-29 03:58:48 +02:00
def test_load_url(self):
print('testing loading via URL')
ical.load_url('https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics')
2020-06-10 15:12:44 +02:00
2020-05-29 03:58:48 +02:00
def test_get_events(self):
print('testing parsing of events')
ical.get_events(arrow.now(), arrow.now().shift(weeks=30))
def test_sorting(self):
print('testing sorting of events')
ical.sort()
def test_show_events(self):
print('testing if events can be shown')
ical.show_events()
2020-05-15 22:40:30 +02:00
if __name__ == '__main__':
2020-05-29 03:58:48 +02:00
unittest.main()