예제 #1
0
 def setUp(self):
     self.millis = CreateData.get_millis()
     self.name = CreateData.create_name()
     payload = {'index': 0, 'limit': 1, 'course_type': 1, 'charge_type': 2}
     r = requests.get(self.url1, params=payload, cookies=self.cookie)
     result = r.json()
     self.log.debug('查询最新的课程信息')
     global courseId, courseName
     courseId = result['data']['courses'][0]['courseId']
     courseName = result['data']['courses'][0]['name']
예제 #2
0
 def get_teacher(self, cookie):
     self.log.debug('URL获取成功, URL:' + self.url)
     r = requests.post(
         self.url,
         cookies=cookie,
         headers=GetValue.header,
         json={
             "name": "教师",
             "accountName": CreateData.create_name(),
             "phone": CreateData.create_phone(),
             "password": GetValue.password,
             "groupIds": ["SYSTEM_TEACHER"],
             "campusIds": [GetValue.campusId],
             "level": 1
         },
     )
     result = r.json()
     return result
예제 #3
0
 def setUp(self):
     self.name = CreateData.create_name()
     self.phone = CreateData.create_phone()
     self.millis = CreateData.get_millis()
예제 #4
0
 def setUp(self):
     self.name = CreateData.create_name()
     self.phone = CreateData.create_phone()
예제 #5
0
 def setUp(self):
     self.course_name = CreateData.create_coursename()