def test_getStoreList(self): print("******** getStoreList start ********") url = self.host + "/mall/getStoreList" params = copy.copy(self.comParams) params["timestamp"] = get_now_time() sign = wopV4Lib.right_sign(params, self.appSecret) params["sign"] = sign resp = requests.post(url, data=params) print(resp.json()) assert resp.status_code == 200 assert self.tenant_id in resp.text assert (resp.elapsed.microseconds / 1000000) < 2
def test_getStoreInfo(self): print("******** getStoreInfo start ********") url = self.host + "/mall/getStoreInfo" params = copy.copy(self.comParams) params["timestamp"] = get_now_time() data = {"storeId": self.storeId} params["data"] = str(data) sign = wopV4Lib.right_sign(params, self.appSecret) params["sign"] = sign resp = requests.post(url, data=params) print(resp.text) assert resp.status_code == 200 assert self.storeId in resp.text assert (resp.elapsed.microseconds / 1000000) < 2
def test_getMemberInfo_Mobile(self): print("******** getMemberInfo start ********") url = self.host + "/member/getMemberInfo" params = self.comParams # params["timestamp"] = get_now_time() params["timestamp"] = '2018-10-11 17:22:43' data = {"queryType": 5, "queryValue": self.memberIds.get("crmUid")} params["data"] = str(data) sign = wopV4Lib.right_sign(params, self.appSecret) params["sign"] = sign print(params) resp = requests.post(url, data=params) print(resp.text) assert resp.status_code == 200 assert self.memberIds.get("normal_mobile") in resp.text assert (resp.elapsed.microseconds / 1000000) < 2