def setUp(self): if os.path.exists(self.db_path): os.unlink(self.db_path) self.app = course_activity_planner.setup('test') self.client = self.app.test_client() self.token = course_activity_planner._create_token(111) # Ignore ics url in request and link to local ics file course_activity_planner._dl_and_save_ics_file = \ MagicMock(return_value=self.local_short_cal_path)
#!/usr/bin/env python3 import course_activity_planner if __name__ == '__main__': course_activity_planner.setup('prod').run(host='0.0.0.0')
def setUp(self): if os.path.exists(self.db_path): os.unlink(self.db_path) self.app = course_activity_planner.setup('test') self.client = self.app.test_client() self.token = course_activity_planner._create_token(111)