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']
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
def setUp(self): self.name = CreateData.create_name() self.phone = CreateData.create_phone() self.millis = CreateData.get_millis()
def setUp(self): self.name = CreateData.create_name() self.phone = CreateData.create_phone()
def setUp(self): self.course_name = CreateData.create_coursename()