Fixed some tests, added a few more
This commit is contained in:
		| @@ -1,26 +1,22 @@ | |||||||
| import unittest | import unittest | ||||||
| from inkycal.modules.inkycal_agenda import agenda | from inkycal.modules import Agenda | ||||||
| #import arrow |  | ||||||
|  |  | ||||||
| agenda = agenda() | agenda = Agenda( | ||||||
|  |   #size | ||||||
|  |   (400,400), | ||||||
|  |  | ||||||
|  |   # config | ||||||
|  |   { | ||||||
|  |   'week_starts_on': 'Monday', | ||||||
|  |   'ical_urls': ['https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics'] | ||||||
|  |   } | ||||||
|  |   ) | ||||||
|  |  | ||||||
| class inkycal_agenda_test(unittest.TestCase): | class inkycal_agenda_test(unittest.TestCase): | ||||||
|  |   def test_generate_image(self): | ||||||
|  |     print('testing image generation') | ||||||
|  |     agenda.generate_image() | ||||||
|  |  | ||||||
| ##  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') |  | ||||||
| ##     |  | ||||||
| ##  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() |  | ||||||
|  |  | ||||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||||
|   unittest.main() |   unittest.main() | ||||||
|   | |||||||
							
								
								
									
										22
									
								
								inkycal/tests/inkycal_calendar_test.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								inkycal/tests/inkycal_calendar_test.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | import unittest | ||||||
|  | from inkycal.modules import Calendar | ||||||
|  |  | ||||||
|  | calendar = Calendar( | ||||||
|  |   #size | ||||||
|  |   (400,400), | ||||||
|  |  | ||||||
|  |   # config | ||||||
|  |   { | ||||||
|  |   'week_starts_on': 'Monday', | ||||||
|  |   'ical_urls': ['https://calendar.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics'] | ||||||
|  |   } | ||||||
|  |   ) | ||||||
|  |  | ||||||
|  | class inkycal_calendar_test(unittest.TestCase): | ||||||
|  |   def test_generate_image(self): | ||||||
|  |     print('testing image generation') | ||||||
|  |     calendar.generate_image() | ||||||
|  |  | ||||||
|  |  | ||||||
|  | if __name__ == '__main__': | ||||||
|  |   unittest.main() | ||||||
							
								
								
									
										22
									
								
								inkycal/tests/inkycal_rss_test.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								inkycal/tests/inkycal_rss_test.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | import unittest | ||||||
|  | from inkycal.modules import RSS | ||||||
|  |  | ||||||
|  | rss = RSS( | ||||||
|  |   #size | ||||||
|  |   (400,400), | ||||||
|  |  | ||||||
|  |   # config | ||||||
|  |   { | ||||||
|  |     'rss_urls': ['http://feeds.bbci.co.uk/news/world/rss.xml#'] | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ) | ||||||
|  |  | ||||||
|  | class inkycal_rss_test(unittest.TestCase): | ||||||
|  |   def test_generate_image(self): | ||||||
|  |     print('testing image generation') | ||||||
|  |     rss.generate_image() | ||||||
|  |  | ||||||
|  |  | ||||||
|  | if __name__ == '__main__': | ||||||
|  |   unittest.main() | ||||||
		Reference in New Issue
	
	Block a user