def test_add_event(): """ Test the Model 'add_event' method """ title = "test" c = CalendarModel(1, 2019) c.clear_all_events() assert (c.amount_of_saving_event() == 0) start = datetime.datetime(2019, 9, 12, 0, 0) end = datetime.datetime(2019, 10, 12, 0, 0) c.add_event(title, start, end) assert (c.amount_of_saving_event() == 1) return None
def test_delete_event(): """ Tests the Model 'delete_event' method """ title = 'test' c = CalendarModel(1, 2019) start = datetime.datetime(2019, 9, 12, 0, 0) end = datetime.datetime(2019, 10, 12, 0, 0) c.delete_event(title, start, end) assert (c.amount_of_saving_event() == 0) return None
def test_delete_event(): """ Tests the Model 'delete_event' method """ title = 'test' c = CalendarModel(1,2019) start = datetime.datetime(2019,9,12,0,0) end = datetime.datetime(2019,10,12,0,0) #start and title are out of order #did not work c.delete_event(start, title, end) assert(c.amount_of_saving_event() == 0) return None