Exemple #1
0
 def test_addCouseSub_4(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '课程订阅').dict_data()[4]
     r = requests.post(self.base_url_1, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '订阅成功')
Exemple #2
0
 def test_addRead_2(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '课程阅读更新').dict_data()[2]
     r = requests.post(self.base_url_2, params=data)
     result = r.json()
     self.assertEqual(result['code'], '-1')
     self.assertEqual(result['msg'], '阅读量更新传入参数异常,更新失败')
Exemple #3
0
 def test_searchCouseList_1(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '课程搜索').dict_data()[1]
     r = requests.get(self.base_url_10, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '查询成功')
Exemple #4
0
 def test_subCouseInfo_7(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '子课程详情').dict_data()[7]
     r = requests.get(self.base_url_11, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '查询成功')
Exemple #5
0
 def test_mineCouse_0(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '我的课程').dict_data()[0]
     r = requests.get(self.base_url_8, params=data)
     result = r.json()
     self.assertEqual(result['code'], '-1')
     self.assertEqual(result['msg'], '查询失败')
Exemple #6
0
 def test_getGeneralistFrontPage_17(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '首页').dict_data()[17]
     r = requests.get(self.base_url_6, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '查询成功')
Exemple #7
0
 def test_getCouseInfoDetail_2(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '大课程详情').dict_data()[2]
     r = requests.get(self.base_url_5, params=data)
     result = r.json()
     self.assertEqual(result['code'], '-1')
     self.assertEqual(result['msg'], '查询失败')
Exemple #8
0
 def test_generalistEnter_1(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '客户端入口').dict_data()[1]
     r = requests.get(self.base_url_4, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '查询成功')
Exemple #9
0
 def test_allCouse_3(self):
     data = ExcelUtil('F:/AutoTestting/TestData/TCcollege.xls',
                      '所有课程').dict_data()[3]
     r = requests.get(self.base_url_3, params=data)
     result = r.json()
     self.assertEqual(result['code'], '0')
     self.assertEqual(result['msg'], '查询成功')