def test_recentLesson(self): path = CommonData.recentLesson response = http.get(path) try: assert response['ok'] == True print('成功获取最近学习⼩节') except: print('获取最近学习⼩节失败')
def test_courseModules(self): path = CommonData.courseModules response = http.get(path) try: assert response['ok'] == True print('成功获取菜单') except: print('获取菜单失败')
def test_courseRole(self): path = CommonData.courseRole response = http.get(path) try: assert response['ok'] == True print('成功获取课程⻆⾊') except: print('获取课程⻆⾊失败')
def test_trends(self): path = CommonData.trends response = http.get(path) try: assert response['ok'] == True print('成功获取最近学习动态') except: print('获取最近学习动态失败')
def test_courseChapters(self): path = CommonData.courseChapters response = http.get(path) try: assert response['ok'] == True print('成功获取⼤纲') except: print('获取⼤纲失败')
def test_courseDetail(self): path = CommonData.courseDetail response = http.get(path) try: assert response['ok'] == True print('成功获取课程详情') except: print('获取课程详情失败')
def test_courseList(self): path = CommonData.courseList response = http.get(path) try: print(response) assert response['ok'] == True print('成功获取课程列表') except: print('获取课程列表失败')
def test_chaperDetail(self): path = CommonData.chaperDetail response = http.get(path) try: #print(response) assert response['ok'] == True print('获取章节成功') except: print('获取章节失败')
def test_s(self,login): login path='api/courses/v3/trends' http.get(path=path)
def test_trends(self): path = '/api/courses/v3/trends' resp = http.get(path) assert resp.status_code == 200 assert resp.json()['ok'] == True
def test_lesson(self): path = '/api/learning/v3/114/lesson/ke-cheng-dao-xue/' resp = http.get(path) assert resp.status_code == 200 assert resp.json()['ok'] == True
def test_chapterDetailself(self): path = '/api/courses/v3/114/chapterDetail' resp = http.get(path) assert resp.status_code == 200 assert resp.json()['ok'] == True
def test_modules(self): path = '/api/courses/v3/114/modules/' resp = http.get(path) assert resp.status_code == 200 assert resp.json()['ok'] == True
def test_recentLesson(self): path = '/api/learning/v3/114/recentLesson' resp = http.get(path) assert resp.status_code == 200 assert resp.json()['ok'] == True
def test_study_success(self): path = "/api/courses/v3/trends" response = http.get(path)