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