示例#1
0
 def test_get_historysport001(self):
     Returndata = Moudle("Wristband_Alpha").bind()
     self.headers = Returndata[1]
     r = Request().post_wirst_request(method=self.method, url=self.url, data=self.parm, header=self.headers)
     print(r)
     Assertions().assert_code(r['code'], self.expect['code'])
     Assertions().assert_code(r['status_code'], self.expect['status_code'])
 def test_unbind_device002(self):
     Returndata = Moudle("Wristband_Alpha").bind()
     self.parm2['device_token'] = Returndata[0]
     self.headers = Returndata[1]
     r = Request().post_wirst_request(method=self.method,
                                      url=self.url,
                                      data=self.parm2,
                                      header=self.headers)
     print(r)
     Assertions().assert_code(r['code'], self.expect2['code'])
     Assertions().assert_code(r['status_code'], self.expect2['status_code'])
 def test_unbind_device001(self):
     Returndata = Moudle("Wristband_Alpha").bind()
     self.parm['device_token'] = Returndata[0]
     self.headers = Returndata[1]
     r = Request().post_wirst_request(method=self.method,
                                      url=self.url,
                                      data=self.parm,
                                      header=self.headers)
     print(r)
     Assertions().assert_code(r['code'], self.expect['code'])
     Assertions().assert_code(r['status_code'], self.expect['status_code'])
     Assertions().assert_time(r['time_total'], self.expect['respones_time'])
     Assertions().assert_code(r['message'], self.expect['message'])
     Assertions().assert_code(r['data']['rst'], self.expect['data']['rst'])
 def setup(self):
     print("Test Start")
     self.log = MyLog()
     self.env2 = "Wristband_Alpha"
     self.moudle = Moudle(self.env2)
     self.log.debug(u'初始化测试数据')