Commit 056eff61f68c400700b119a99e3b1f91f891bd0d
1 parent
c78e4bf0
创建大客户订单
Showing
1 changed file
with
8 additions
and
8 deletions
testcase/hg/tradingOrder/test_createAndTrade.py
... | ... | @@ -52,25 +52,25 @@ ORDER BY |
52 | 52 | body2["customerName"] = str(cls.aaa[4]) |
53 | 53 | body2["identityCardNo"] = str(cls.aaa[5]) |
54 | 54 | body2["mobilephoneNumber"] = str(cls.aaa[6]) |
55 | - print("士大夫但是",body2) | |
56 | - print("水电费",cls.aaa) | |
57 | - print("撒地方",type(cls.aaa)) | |
55 | + body2["categoryId"] = 44 | |
56 | + body2["categoryCode"] = 754107 | |
57 | + body2["categoryName"] = "葡萄" | |
58 | 58 | re = hg.post(url = r.url, headers = r.header, json = body2,proxies = hg.proxies) |
59 | - # 获取批号 | |
60 | - # cls.batch = re.json()["data"]["batchCode"] | |
61 | - # return cls.batch | |
59 | + "获取批号" | |
60 | + print("获取批号结果:",re.json()) | |
61 | + cls.batch = re.json()["data"]["batchCode"] | |
62 | + return cls.batch | |
62 | 63 | |
63 | 64 | @unittest.case_mark(my.mark()) |
64 | 65 | def test_createAndTrade_01(self): |
65 | 66 | "大客户创建订单" |
66 | 67 | body = creat.body.copy() |
67 | 68 | body["orderItemList"][0]["batchCode"] = self.batch |
69 | + print("创建订单body",body) | |
68 | 70 | re1 = hg.post(url = creat.url, headers = creat.header, json = body,proxies = hg.proxies) |
69 | 71 | print(re1.json()) |
70 | 72 | self.assertEqual(re1.status_code, 200) |
71 | 73 | self.assertTrue("'操作成功'" in str(re1.json()).replace(" ", "")) |
72 | - | |
73 | - | |
74 | 74 | @classmethod |
75 | 75 | def tearDownClass(cls): |
76 | 76 | pass | ... | ... |