Best Python code snippet using lemoncheesecake
test_order.py
Source:test_order.py
...14 global customid15 useru = 'http://api.xymtest.com/merchant/store/order/manage/get/custom/info?mobile='16 userr = xymways.test_data.data_order.order_query().order()[0]17 useeurl = useru + userr18 orderuser = run.run_main(useeurl, 'GET', header_merchant)19 assert orderuser['code'] == 20020 # print(orderuser)21 customid = orderuser['data'][0]['custId']22 realName = orderuser['data'][0]['realName']23 pan = orderuser['data']24 # print('顾客custid:', customid)25 return customid, realName, pan26 # æ¥è¯¢å°å¼åèç¨æ·çå°å27 def test_order_address(self):28 addressu = 'http://api.xymtest.com/merchant/store/order/open/distribution?customId='29 addressr = json.dumps(customid)30 addressurl = addressu + addressr31 orderaddress = run.run_main(addressurl, 'POST', header_merchant)32 assert orderaddress['code'] != 50033 # print('顾客å°åï¼', orderaddress)34 address = orderaddress['data']['address'][0]['addId']35 return address36 # æ¥è¯¢å¼åç¨æ·ä¼åå¡37 def test_order_card(self):38 global cardid, cardtype39 cardu = 'http://api.xymtest.com/merchant/custom/member/card/query/list?customId='40 cardr = json.dumps(customid)41 cardl = '&orderId='42 cardurl = cardu + cardr + cardl43 ordercard = run.run_main(cardurl, 'GET', header_merchant)44 assert ordercard['code'] != 50045 # print(ordercard)46 # æ ¹æ®éè¦çèåå¡æ¥è¿è¡è¿ååæ°47 membershipcard = ordercard['data']48 for cardId in membershipcard:49 if cardId['cardName'] == xymways.test_data.data_order.order_query().order()[1]:50 cardid = cardId['cardId']51 cardtype = cardId['cardType']52 # print('顾客ä¼åå¡customId:', cardid, '\n顾客ä¼åå¡ç±»åï¼', cardtype)53 break54 return cardId55 # æ¥è¯¢æå
³èçæ´»å¨56 def test_activities(self):57 activitiesu = 'http://api.xymtest.com/merchant/store/order/manage/activity/list?customId=' + json.dumps(58 customid)59 activitiesr = '&cardId=' + cardid60 activitiesl = '&cardType=' + cardtype61 activitiesurl = activitiesu + activitiesr + activitiesl62 # print(activitiesurl)63 activitiesorder = run.run_main(activitiesurl, 'GET', header_merchant)64 # print(activitiesorder)65 assert activitiesorder['code'] != 50066 return activitiesorder67# å¼å68class Test_Billings():69 # '''70 # å¼å¸¸å¼å71 def test_prequalification_001(self):72 print('001ä¸æ·»å åå顾客å¼å')73 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'74 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[0]75 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))76 print(prequalificationorder)77 assert prequalificationorder['message'] == '订åè³å°å
å«ä¸ä»¶åå'78 return prequalificationorder79 def test_prequalification_002(self):80 print('002å¼åååæ¶è´§ï¼ä½ä¸å¡«åæ¶è´§å°å')81 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'82 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[1]83 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,84 json.dumps(prequalificationdata))85 print(prequalificationorder)86 assert prequalificationorder['message'] == '请添å éè´§å°å'87 return prequalificationorder88 def test_prequalification_003(self):89 print('003å¼åä¸æ¶è´§ï¼åå¡«åæ¶è´§å°å')90 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'91 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[2]92 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,93 json.dumps(prequalificationdata))94 assert prequalificationorder['code'] == 20095 print(prequalificationorder)96 return prequalificationorder97 def test_prequalification_004(self):98 print('004没æç¨æ·å¼å')99 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'100 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[3]101 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,102 json.dumps(prequalificationdata))103 # assertion.assertions(self, contrast='请填åè´è´§äººä¿¡æ¯', passvalue=prequalificationorder['message'])104 print(prequalificationorder)105 assert prequalificationorder['message'] == '请填åè´è´§äººä¿¡æ¯'106 return prequalificationorder107 def test_prequalification_005(self):108 print('005ç¨æ·æ²¡æä¼åå¡å¼å')109 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'110 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[4]111 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,112 json.dumps(prequalificationdata))113 # assertion.assertions(self, contrast='请éæ©ä¼åå¡', passvalue=prequalificationorder['message'])114 print(prequalificationorder)115 assert prequalificationorder['message'] == '请éæ©ä¼åå¡'116 return prequalificationorder117 def test_prequalification_006(self):118 print('006å¼åç¨æ·æ²¡æ顾客å§å')119 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'120 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[5]121 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,122 json.dumps(prequalificationdata))123 # assertion.assertions(self, contrast='请填å顾客å§å', passvalue=prequalificationorder['message'])124 print(prequalificationorder)125 assert prequalificationorder['message'] == '请填å顾客å§å'126 return prequalificationorder127 def test_prequalification_007(self):128 print('007å¼åä¸å¡«é¢è®¡å®ææ¶é´')129 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'130 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[6]131 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,132 json.dumps(prequalificationdata))133 # assertion.assertions(self, contrast='订åé¢è®¡å®ææ¶é´ä¸å¯ä¸ºç©º', passvalue=prequalificationorder['message'])134 print(prequalificationorder)135 assert prequalificationorder['message'] == '订åé¢è®¡å®ææ¶é´ä¸å¯ä¸ºç©º'136 return prequalificationorder137 def test_prequalification_008(self):138 print('008å¼åé¢è®¡å®ææ¶é´å¡«ä»å¤©ä¹å')139 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'140 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[7]141 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,142 json.dumps(prequalificationdata))143 # assertion.assertions(self, contrast='订åé¢è®¡å®ææ¶é´éä»å¤©æ以å', passvalue=prequalificationorder['message'])144 print(prequalificationorder)145 assert prequalificationorder['message'] == '订åé¢è®¡å®ææ¶é´éä»å¤©æ以å'146 return prequalificationorder147 def test_prequalification_009(self):148 print('009订åç¨å
¶å®åºéºååå¼å')149 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'150 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[8]151 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,152 json.dumps(prequalificationdata))153 # assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])154 print(prequalificationorder)155 assert prequalificationorder['code'] == 500156 return prequalificationorder157 def test_prequalification_010(self):158 print('010订åååç±»åä¸ä¸è´å¼å')159 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'160 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[9]161 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,162 json.dumps(prequalificationdata))163 # assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])164 print(prequalificationorder)165 assert prequalificationorder['code'] != 500166 return prequalificationorder167 def test_prequalification_011(self):168 print('010订åååç±»åä¸ä¸è´å¼å')169 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'170 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[10]171 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,172 json.dumps(prequalificationdata))173 # assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])174 print(prequalificationorder)175 assert prequalificationorder['code'] == 500176 return prequalificationorder177 def test_prequalification_012(self):178 print('010订åååç±»åä¸ä¸è´å¼å')179 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'180 prequalificationdata = xymways.test_data.data_order.order_billing.billings_01()[11]181 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,182 json.dumps(prequalificationdata))183 # assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])184 print(prequalificationorder)185 assert prequalificationorder['code'] == 500186 return prequalificationorder187 # æ£å¸¸å¼å188 def test_prequalification_01(self):189 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个æ®éååå¼å')190 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'191 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[0]192 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))193 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])194 print(prequalificationorder)195 assert prequalificationorder['code'] == 200196 return prequalificationorder197 def test_prequalification_02(self):198 print('ä¸åå æ´»å¨,ééè´§ï¼å个æ®éååå¼å')199 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'200 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[1]201 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))202 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])203 assert prequalificationorder['code'] == 200204 return prequalificationorder205 def test_prequalification_03(self):206 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个å¥ç»åå¼å')207 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'208 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[2]209 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))210 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])211 assert prequalificationorder['code'] != 500212 return prequalificationorder213 def test_prequalification_04(self):214 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个æå¡è´¹ç¨åååå¼å')215 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'216 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[3]217 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))218 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])219 assert prequalificationorder['code'] != 500220 return prequalificationorder221 def test_prequalification_05(self):222 print('ä¸åå æ´»å¨,å¤ä¸ªæ®éååå¼å')223 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'224 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[4]225 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))226 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])227 assert prequalificationorder['code'] != 500228 return prequalificationorder229 def test_prequalification_06(self):230 print('ä¸åå æ´»å¨,å¤ä¸ªå¥ç»ååå¼å')231 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'232 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[4]233 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))234 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])235 assert prequalificationorder['code'] != 500236 return prequalificationorder237 def test_prequalification_07(self):238 print('ä¸åå æ´»å¨,å¤ä¸ªæå¡è´¹ååå¼å')239 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'240 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[6]241 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))242 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])243 assert prequalificationorder['code'] != 500244 return prequalificationorder245 def test_prequalification_08(self):246 print('ä¸åå æ´»å¨ï¼ æ®éååä¸å¥ç»å¼å')247 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'248 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[7]249 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))250 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])251 assert prequalificationorder['code'] != 500252 return prequalificationorder253 def test_prequalification_09(self):254 print('ä¸åå æ´»å¨ï¼ æ®éååä¸æå¡è´¹å¼å')255 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'256 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[8]257 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))258 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])259 assert prequalificationorder['code'] != 500260 return prequalificationorder261 def test_prequalification_10(self):262 print('ä¸åå æ´»å¨ï¼ å¥ç»ä¸æå¡å¼å')263 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'264 prequalificationdata = xymways.test_data.data_order.order_billing.billings()[9]265 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))266 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])267 assert prequalificationorder['code'] != 500268 return prequalificationorder269 # 订åç¹ä»·å¼å270 # æ®éåå271 def test_prequalification_11(self):272 print('æ®éååç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')273 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'274 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[0]275 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))276 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])277 assert prequalificationorder['code'] != 500278 return prequalificationorder279 def test_prequalification_12(self):280 print('æ®éååç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')281 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'282 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[1]283 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))284 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])285 assert prequalificationorder['code'] != 500286 return prequalificationorder287 def test_prequalification_13(self):288 print('æ®éååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')289 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'290 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[2]291 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))292 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])293 assert prequalificationorder['code'] != 500294 return prequalificationorder295 def test_prequalification_14(self):296 print('æ®éååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')297 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'298 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[3]299 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))300 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])301 assert prequalificationorder['code'] != 500302 return prequalificationorder303 def test_prequalification_15(self):304 print('æ®éååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')305 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'306 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[4]307 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))308 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])309 assert prequalificationorder['code'] != 500310 return prequalificationorder311 def test_prequalification_16(self):312 print('æ®éååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')313 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'314 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[5]315 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))316 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])317 assert prequalificationorder['code'] != 500318 return prequalificationorder319 def test_prequalification_17(self):320 print('æ®éååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')321 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'322 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[6]323 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))324 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])325 assert prequalificationorder['code'] != 500326 return prequalificationorder327 def test_prequalification_18(self):328 print('æ®éååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')329 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'330 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[7]331 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))332 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])333 assert prequalificationorder['code'] != 500334 return prequalificationorder335 def test_prequalification_19(self):336 print('ä¸æ®éååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')337 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'338 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[8]339 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))340 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])341 assert prequalificationorder['code'] != 500342 return prequalificationorder343 def test_prequalification_20(self):344 print('æ®éååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')345 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'346 prequalificationdata = xymways.test_data.data_order.order_billing.billings_02()[9]347 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))348 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])349 assert prequalificationorder['code'] != 500350 return prequalificationorder351 # å¥ç»352 def test_prequalification_21(self):353 print('å¥ç»ååç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')354 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'355 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[0]356 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))357 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])358 assert prequalificationorder['code'] != 500359 return prequalificationorder360 def test_prequalification_22(self):361 print('å¥ç»ååç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')362 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'363 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[1]364 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))365 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])366 assert prequalificationorder['code'] != 500367 return prequalificationorder368 def test_prequalification_23(self):369 print('å¥ç»ååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')370 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'371 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[2]372 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))373 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])374 assert prequalificationorder['code'] != 500375 return prequalificationorder376 def test_prequalification_24(self):377 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')378 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'379 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[3]380 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))381 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])382 assert prequalificationorder['code'] != 500383 return prequalificationorder384 def test_prequalification_25(self):385 print('å¥ç»ååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')386 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'387 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[4]388 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))389 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])390 assert prequalificationorder['code'] != 500391 return prequalificationorder392 def test_prequalification_26(self):393 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')394 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'395 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[5]396 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))397 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])398 assert prequalificationorder['code'] != 500399 return prequalificationorder400 def test_prequalification_27(self):401 print('å¥ç»ååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')402 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'403 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[6]404 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))405 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])406 assert prequalificationorder['code'] != 500407 return prequalificationorder408 def test_prequalification_28(self):409 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')410 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'411 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[7]412 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))413 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])414 assert prequalificationorder['code'] != 500415 return prequalificationorder416 def test_prequalification_29(self):417 print('å¥ç»ååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')418 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'419 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[8]420 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))421 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])422 assert prequalificationorder['code'] != 500423 return prequalificationorder424 def test_prequalification_30(self):425 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')426 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'427 prequalificationdata = xymways.test_data.data_order.order_billing.billings_03()[9]428 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))429 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])430 assert prequalificationorder['code'] != 500431 return prequalificationorder432 # æå¡è´¹ç¨433 def test_prequalification_31(self):434 print('æå¡è´¹ç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')435 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'436 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[0]437 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))438 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])439 assert prequalificationorder['code'] != 500440 return prequalificationorder441 def test_prequalification_32(self):442 print('æå¡è´¹ç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')443 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'444 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[1]445 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))446 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])447 assert prequalificationorder['code'] != 500448 return prequalificationorder449 def test_prequalification_33(self):450 print('æå¡è´¹ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')451 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'452 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[2]453 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))454 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])455 assert prequalificationorder['code'] != 500456 return prequalificationorder457 def test_prequalification_34(self):458 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')459 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'460 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[3]461 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))462 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])463 assert prequalificationorder['code'] != 500464 return prequalificationorder465 def test_prequalification_35(self):466 print('æå¡è´¹ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')467 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'468 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[4]469 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))470 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])471 assert prequalificationorder['code'] != 500472 return prequalificationorder473 def test_prequalification_36(self):474 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')475 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'476 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[5]477 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))478 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])479 assert prequalificationorder['code'] != 500480 return prequalificationorder481 def test_prequalification_37(self):482 print('æå¡è´¹ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')483 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'484 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[6]485 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))486 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])487 assert prequalificationorder['code'] != 500488 return prequalificationorder489 def test_prequalification_38(self):490 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')491 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'492 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[7]493 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))494 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])495 assert prequalificationorder['code'] != 500496 return prequalificationorder497 def test_prequalification_39(self):498 print('æå¡è´¹ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')499 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'500 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[8]501 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))502 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])503 assert prequalificationorder['code'] != 500504 return prequalificationorder505 def test_prequalification_40(self):506 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')507 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'508 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[9]509 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))510 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])511 assert prequalificationorder['code'] != 500512 return prequalificationorder513 # æ®éååæ´åææ514 def test_prequalification_41(self):515 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')516 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'517 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[0]518 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))519 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])520 assert prequalificationorder['code'] != 500521 return prequalificationorder522 def test_prequalification_42(self):523 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1æï¼')524 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'525 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[1]526 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))527 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])528 assert prequalificationorder['code'] != 500529 return prequalificationorder530 def test_prequalification_43(self):531 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')532 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'533 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[2]534 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))535 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])536 assert prequalificationorder['code'] != 500537 return prequalificationorder538 def test_prequalification_44(self):539 print('æ®éåå(ç¹ä»·ï¼æ´åææ(0æï¼')540 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'541 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[3]542 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))543 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])544 assert prequalificationorder['code'] != 500545 return prequalificationorder546 def test_prequalification_45(self):547 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')548 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'549 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[4]550 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))551 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])552 # print(prequalificationorder)553 assert prequalificationorder['code'] != 500554 return prequalificationorder555 def test_prequalification_46(self):556 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')557 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'558 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[5]559 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))560 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])561 assert prequalificationorder['code'] != 500562 return prequalificationorder563 def test_prequalification_47(self):564 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')565 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'566 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[6]567 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))568 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])569 assert prequalificationorder['code'] != 500570 return prequalificationorder571 def test_prequalification_48(self):572 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')573 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'574 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[7]575 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))576 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])577 assert prequalificationorder['code'] != 500578 return prequalificationorder579 def test_prequalification_49(self):580 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')581 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'582 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[8]583 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))584 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])585 assert prequalificationorder['code'] != 500586 return prequalificationorder587 def test_prequalification_50(self):588 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')589 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'590 prequalificationdata = xymways.test_data.data_order.order_billing.billings_05()[9]591 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))592 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])593 assert prequalificationorder['code'] != 500594 return prequalificationorder595 # æå¡è´¹æ´åææ596 def test_prequalification_51(self):597 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')598 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'599 prequalificationdata = xymways.test_data.data_order.order_billing.billings_06()[0]600 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))601 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])602 assert prequalificationorder['code'] != 500603 return prequalificationorder604 def test_prequalification_52(self):605 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1æï¼')606 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'607 prequalificationdata = xymways.test_data.data_order.order_billing.billings_06()[1]608 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))609 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])610 # print(prequalificationorder)611 assert prequalificationorder['code'] != 500612 return prequalificationorder613 def test_prequalification_53(self):614 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')615 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'616 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[0]617 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))618 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])619 assert prequalificationorder['code'] != 500620 return prequalificationorder621 def test_prequalification_54(self):622 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(0æï¼')623 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'624 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[1]625 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))626 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])627 assert prequalificationorder['code'] != 500628 return prequalificationorder629 def test_prequalification_55(self):630 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')631 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'632 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[0]633 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))634 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])635 assert prequalificationorder['code'] != 500636 return prequalificationorder637 def test_prequalification_56(self):638 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')639 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'640 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[1]641 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))642 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])643 assert prequalificationorder['code'] != 500644 return prequalificationorder645 def test_prequalification_57(self):646 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')647 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'648 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[0]649 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))650 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])651 assert prequalificationorder['code'] != 500652 return prequalificationorder653 def test_prequalification_58(self):654 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')655 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'656 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[1]657 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))658 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])659 assert prequalificationorder['code'] != 500660 return prequalificationorder661 def test_prequalification_59(self):662 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')663 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'664 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[0]665 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))666 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])667 assert prequalificationorder['code'] != 500668 return prequalificationorder669 def test_prequalification_60(self):670 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')671 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'672 prequalificationdata = xymways.test_data.data_order.order_billing.billings_04()[1]673 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))674 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])675 assert prequalificationorder['code'] != 500676 return prequalificationorder677 # å¥ç»ååæ´åææ678 def test_prequalification_61(self):679 print('ä¸åå æ´»å¨ï¼ å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')680 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'681 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[0]682 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))683 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])684 assert prequalificationorder['code'] != 500685 return prequalificationorder686 def test_prequalification_62(self):687 print('ä¸åå æ´»å¨ï¼ å¥ç»åå(ç¹ä»·ï¼æ´åææ(1æï¼')688 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'689 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[1]690 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))691 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])692 # print(prequalificationorder)693 assert prequalificationorder['code'] != 500694 return prequalificationorder695 def test_prequalification_63(self):696 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')697 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'698 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[2]699 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))700 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])701 assert prequalificationorder['code'] != 500702 return prequalificationorder703 def test_prequalification_64(self):704 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(0æï¼')705 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'706 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[3]707 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))708 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])709 assert prequalificationorder['code'] != 500710 return prequalificationorder711 def test_prequalification_65(self):712 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')713 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'714 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[4]715 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))716 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])717 assert prequalificationorder['code'] != 500718 return prequalificationorder719 def test_prequalification_66(self):720 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')721 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'722 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[5]723 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))724 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])725 assert prequalificationorder['code'] != 500726 return prequalificationorder727 def test_prequalification_67(self):728 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')729 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'730 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[6]731 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))732 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])733 assert prequalificationorder['code'] != 500734 return prequalificationorder735 def test_prequalification_68(self):736 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')737 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'738 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[7]739 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))740 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])741 assert prequalificationorder['code'] != 500742 return prequalificationorder743 def test_prequalification_69(self):744 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')745 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'746 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[8]747 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant, json.dumps(prequalificationdata))748 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])749 assert prequalificationorder['code'] != 500750 return prequalificationorder751 def test_prequalification_70(self):752 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')753 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'754 prequalificationdata = xymways.test_data.data_order.order_billing.billings_07()[9]755 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,756 json.dumps(prequalificationdata))757 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])758 assert prequalificationorder['code'] != 500759 return prequalificationorder760 # æ®éååä¸æå¡è´¹æ´åææ761 def test_prequalification_71(self):762 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1')763 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'764 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[0]765 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,766 json.dumps(prequalificationdata))767 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])768 print(prequalificationorder)769 assert prequalificationorder['code'] != 200770 return prequalificationorder771 def test_prequalification_72(self):772 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1')773 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'774 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[1]775 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,776 json.dumps(prequalificationdata))777 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])778 print(prequalificationorder)779 assert prequalificationorder['code'] == 200780 return prequalificationorder781 def test_prequalification_73(self):782 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ0')783 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'784 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[2]785 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,786 json.dumps(prequalificationdata))787 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])788 print(prequalificationorder)789 assert prequalificationorder['code'] == 251000010790 return prequalificationorder791 def test_prequalification_74(self):792 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1000')793 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'794 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[3]795 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,796 json.dumps(prequalificationdata))797 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])798 print(prequalificationorder)799 assert prequalificationorder['code'] != 200800 return prequalificationorder801 def test_prequalification_75(self):802 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1000')803 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'804 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[4]805 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,806 json.dumps(prequalificationdata))807 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])808 print(prequalificationorder)809 assert prequalificationorder['code'] == 200810 return prequalificationorder811 def test_prequalification_76(self):812 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ0')813 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'814 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[5]815 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,816 json.dumps(prequalificationdata))817 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])818 print(prequalificationorder)819 assert prequalificationorder['code'] == 251000010820 return prequalificationorder821 def test_prequalification_77(self):822 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ0')823 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'824 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[6]825 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,826 json.dumps(prequalificationdata))827 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])828 print(prequalificationorder)829 assert prequalificationorder['code'] != 200830 return prequalificationorder831 def test_prequalification_78(self):832 print('ä¸åå æ´»å¨ï¼æå¡ç¹ä»·ï¼æ´åææ0')833 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'834 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[7]835 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,836 json.dumps(prequalificationdata))837 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])838 print(prequalificationorder)839 assert prequalificationorder['code'] == 251000010840 return prequalificationorder841 def test_prequalification_79(self):842 print('ä¸åå æ´»å¨ï¼æå¡ç¹ä»·ï¼æ´åææ1000')843 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'844 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[8]845 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,846 json.dumps(prequalificationdata))847 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])848 print(prequalificationorder)849 assert prequalificationorder['code'] == 200850 return prequalificationorder851 def test_prequalification_80(self):852 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ1000')853 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'854 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[9]855 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,856 json.dumps(prequalificationdata))857 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])858 print(prequalificationorder)859 assert prequalificationorder['code'] == 200860 return prequalificationorder861 def test_prequalification_81(self):862 print('ä¸åå æ´»å¨ï¼æå¡ç¹ä»·ï¼æ´åææ1000')863 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'864 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[10]865 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,866 json.dumps(prequalificationdata))867 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])868 print(prequalificationorder)869 assert prequalificationorder['code'] == 200870 return prequalificationorder871 def test_prequalification_82(self):872 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ1000')873 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'874 prequalificationdata = xymways.test_data.data_order.order_billing.billings_08()[11]875 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,876 json.dumps(prequalificationdata))877 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])878 print(prequalificationorder)879 assert prequalificationorder['code'] == 200880 return prequalificationorder881 # æ®éååä¸å¥ç»æ´åææ882 def test_prequalification_83(self):883 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1')884 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'885 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[0]886 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,887 json.dumps(prequalificationdata))888 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])889 print(prequalificationorder)890 assert prequalificationorder['code'] != 500891 return prequalificationorder892 def test_prequalification_84(self):893 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1')894 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'895 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[1]896 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,897 json.dumps(prequalificationdata))898 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])899 print(prequalificationorder)900 assert prequalificationorder['code'] == 200901 return prequalificationorder902 def test_prequalification_85(self):903 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ0')904 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'905 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[2]906 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,907 json.dumps(prequalificationdata))908 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])909 print(prequalificationorder)910 assert prequalificationorder['code'] == 251000010911 return prequalificationorder912 def test_prequalification_86(self):913 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1000')914 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'915 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[3]916 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,917 json.dumps(prequalificationdata))918 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])919 print(prequalificationorder)920 assert prequalificationorder['code'] != 500921 return prequalificationorder922 def test_prequalification_87(self):923 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1000')924 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'925 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[4]926 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,927 json.dumps(prequalificationdata))928 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])929 print(prequalificationorder)930 assert prequalificationorder['code'] == 200931 return prequalificationorder932 def test_prequalification_88(self):933 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ0')934 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'935 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[5]936 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,937 json.dumps(prequalificationdata))938 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])939 print(prequalificationorder)940 assert prequalificationorder['code'] == 251000010941 return prequalificationorder942 def test_prequalification_89(self):943 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ0')944 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'945 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[6]946 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,947 json.dumps(prequalificationdata))948 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])949 print(prequalificationorder)950 assert prequalificationorder['code'] != 200951 return prequalificationorder952 def test_prequalification_90(self):953 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åææ0')954 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'955 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[7]956 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,957 json.dumps(prequalificationdata))958 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])959 print(prequalificationorder)960 assert prequalificationorder['code'] != 200961 return prequalificationorder962 def test_prequalification_91(self):963 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åææ1000')964 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'965 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[8]966 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,967 json.dumps(prequalificationdata))968 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])969 print(prequalificationorder)970 assert prequalificationorder['code'] == 200971 return prequalificationorder972 def test_prequalification_92(self):973 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ1000')974 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'975 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[9]976 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,977 json.dumps(prequalificationdata))978 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])979 print(prequalificationorder)980 assert prequalificationorder['code'] == 200981 return prequalificationorder982 def test_prequalification_93(self):983 print('ä¸åå æ´»å¨ï¼æå¡ç¹ä»·ï¼æ´åææ1000')984 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'985 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[10]986 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,987 json.dumps(prequalificationdata))988 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])989 print(prequalificationorder)990 assert prequalificationorder['code'] == 200991 return prequalificationorder992 def test_prequalification_94(self):993 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åææ1000')994 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'995 prequalificationdata = xymways.test_data.data_order.order_billing.billings_09()[11]996 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,997 json.dumps(prequalificationdata))998 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])999 print(prequalificationorder)1000 assert prequalificationorder['code'] == 2001001 return prequalificationorder1002 # æå¡è´¹ä¸å¥ç»æ´åææ1003 def test_prequalification_95(self):1004 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1')1005 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1006 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[0]1007 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1008 json.dumps(prequalificationdata))1009 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1010 print(prequalificationorder)1011 assert prequalificationorder['code'] != 5001012 return prequalificationorder1013 def test_prequalification_96(self):1014 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1')1015 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1016 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[1]1017 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1018 json.dumps(prequalificationdata))1019 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1020 print(prequalificationorder)1021 assert prequalificationorder['code'] == 2001022 return prequalificationorder1023 def test_prequalification_97(self):1024 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ0')1025 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1026 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[2]1027 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1028 json.dumps(prequalificationdata))1029 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1030 print(prequalificationorder)1031 assert prequalificationorder['code'] == 2510000101032 return prequalificationorder1033 def test_prequalification_98(self):1034 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åææ1000')1035 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1036 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[3]1037 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1038 json.dumps(prequalificationdata))1039 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1040 print(prequalificationorder)1041 assert prequalificationorder['code'] != 5001042 return prequalificationorder1043 def test_prequalification_99(self):1044 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ1000')1045 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1046 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[4]1047 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1048 json.dumps(prequalificationdata))1049 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1050 print(prequalificationorder)1051 assert prequalificationorder['code'] == 2001052 return prequalificationorder1053 def test_prequalification_100(self):1054 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åææ0')1055 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1056 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[5]1057 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1058 json.dumps(prequalificationdata))1059 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1060 print(prequalificationorder)1061 assert prequalificationorder['code'] == 2510000101062 return prequalificationorder1063 def test_prequalification_101(self):1064 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åææ0')1065 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1066 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[6]1067 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1068 json.dumps(prequalificationdata))1069 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1070 print(prequalificationorder)1071 assert prequalificationorder['code'] != 2001072 return prequalificationorder1073 def test_prequalification_102(self):1074 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åææ0')1075 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1076 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[7]1077 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1078 json.dumps(prequalificationdata))1079 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1080 print(prequalificationorder)1081 assert prequalificationorder['code'] != 2001082 return prequalificationorder1083 def test_prequalification_103(self):1084 print('ä¸åå æ´»å¨ï¼å¥ç»ç¨ç¹ä»·ï¼æ´åææ1000')1085 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1086 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[8]1087 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1088 json.dumps(prequalificationdata))1089 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1090 print(prequalificationorder)1091 assert prequalificationorder['code'] == 2001092 return prequalificationorder1093 def test_prequalification_104(self):1094 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åææ1000')1095 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1096 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[9]1097 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1098 json.dumps(prequalificationdata))1099 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1100 print(prequalificationorder)1101 assert prequalificationorder['code'] == 2001102 return prequalificationorder1103 def test_prequalification_105(self):1104 print('ä¸åå æ´»å¨ï¼æå¡ç¹ä»·ï¼æ´åææ1000')1105 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1106 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[10]1107 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1108 json.dumps(prequalificationdata))1109 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1110 print(prequalificationorder)1111 assert prequalificationorder['code'] == 2001112 return prequalificationorder1113 def test_prequalification_106(self):1114 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¨ç¹ä»·ï¼æ´åææ1000')1115 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1116 prequalificationdata = xymways.test_data.data_order.order_billing.billings_10()[11]1117 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1118 json.dumps(prequalificationdata))1119 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1120 print(prequalificationorder)1121 assert prequalificationorder['code'] == 2001122 return prequalificationorder1123 # æ®éååæ´åä¼æ 1124 def test_prequalification_107(self):1125 print('ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·')1126 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1127 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[0]1128 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1129 json.dumps(prequalificationdata))1130 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1131 print(prequalificationorder)1132 assert prequalificationorder['code'] == 2001133 return prequalificationorder1134 def test_prequalification_108(self):1135 print('ååæ´åä¼æ å°789ï¼ ååç¹ä»·')1136 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1137 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[1]1138 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1139 json.dumps(prequalificationdata))1140 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1141 print(prequalificationorder)1142 assert prequalificationorder['code'] == 2001143 return prequalificationorder1144 def test_prequalification_109(self):1145 print('ååæ´åä¼æ å°0ï¼ ååä¸ç¹ä»·')1146 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1147 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[2]1148 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1149 json.dumps(prequalificationdata))1150 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1151 print(prequalificationorder)1152 assert prequalificationorder['code'] == 2510000101153 return prequalificationorder1154 def test_prequalification_110(self):1155 print('ååæ´åä¼æ å°0ï¼ ååç¹ä»·')1156 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1157 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[3]1158 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1159 json.dumps(prequalificationdata))1160 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1161 print(prequalificationorder)1162 assert prequalificationorder['code'] == 2510000101163 return prequalificationorder1164 def test_prequalification_111(self):1165 print('ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååä¸ç¹ä»·')1166 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1167 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[4]1168 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1169 json.dumps(prequalificationdata))1170 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1171 print(prequalificationorder)1172 assert prequalificationorder['code'] == 2001173 return prequalificationorder1174 def test_prequalification_112(self):1175 print('ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååç¹ä»·')1176 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1177 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[5]1178 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1179 json.dumps(prequalificationdata))1180 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1181 print(prequalificationorder)1182 assert prequalificationorder['code'] != 2001183 return prequalificationorder1184 def test_prequalification_113(self):1185 print('ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å 大äºéå¶çååå¤æ³¨')1186 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1187 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[6]1188 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1189 json.dumps(prequalificationdata))1190 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1191 print(prequalificationorder)1192 assert prequalificationorder['code'] == 2001193 return prequalificationorder1194 def test_prequalification_114(self):1195 print('ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å æ£å¸¸çååå¤æ³¨')1196 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1197 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[7]1198 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1199 json.dumps(prequalificationdata))1200 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1201 print(prequalificationorder)1202 assert prequalificationorder['code'] == 2001203 return prequalificationorder1204 def test_prequalification_115(self):1205 print('ååæ´åä¼æ orderPreferensï¼ä¸ºç©º')1206 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1207 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[8]1208 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1209 json.dumps(prequalificationdata))1210 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1211 print(prequalificationorder)1212 assert prequalificationorder['code'] == 2001213 return prequalificationorder1214 def test_prequalification_116(self):1215 print('ååæ´åä¼æ ä¸ä¼ orderPreferens')1216 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1217 prequalificationdata = xymways.test_data.data_order.order_billing.billings_11()[9]1218 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1219 json.dumps(prequalificationdata))1220 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1221 print(prequalificationorder)1222 assert prequalificationorder['code'] == 2001223 return prequalificationorder1224 # å¥ç»ååæ´åä¼æ 1225 def test_prequalification_117(self):1226 print('å¥ç»ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·')1227 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1228 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[0]1229 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1230 json.dumps(prequalificationdata))1231 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1232 print(prequalificationorder)1233 assert prequalificationorder['code'] == 2001234 return prequalificationorder1235 def test_prequalification_118(self):1236 print('å¥ç»ååæ´åä¼æ å°789ï¼ ååç¹ä»·')1237 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1238 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[1]1239 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1240 json.dumps(prequalificationdata))1241 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1242 print(prequalificationorder)1243 assert prequalificationorder['code'] == 2001244 return prequalificationorder1245 def test_prequalification_119(self):1246 print('å¥ç»ååæ´åä¼æ å°0ï¼ ååä¸ç¹ä»·')1247 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1248 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[2]1249 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1250 json.dumps(prequalificationdata))1251 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1252 print(prequalificationorder)1253 assert prequalificationorder['code'] == 2510000101254 return prequalificationorder1255 def test_prequalification_120(self):1256 print('å¥ç»ååæ´åä¼æ å°0ï¼ ååç¹ä»·')1257 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1258 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[3]1259 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1260 json.dumps(prequalificationdata))1261 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1262 print(prequalificationorder)1263 assert prequalificationorder['code'] == 2510000101264 return prequalificationorder1265 def test_prequalification_121(self):1266 print('å¥ç»ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååä¸ç¹ä»·')1267 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1268 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[4]1269 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1270 json.dumps(prequalificationdata))1271 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1272 print(prequalificationorder)1273 assert prequalificationorder['code'] == 2001274 return prequalificationorder1275 def test_prequalification_122(self):1276 print('å¥ç»ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååç¹ä»·')1277 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1278 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[5]1279 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1280 json.dumps(prequalificationdata))1281 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1282 print(prequalificationorder)1283 assert prequalificationorder['code'] != 2001284 return prequalificationorder1285 def test_prequalification_123(self):1286 print('å¥ç»ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å 大äºéå¶çååå¤æ³¨')1287 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1288 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[6]1289 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1290 json.dumps(prequalificationdata))1291 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1292 print(prequalificationorder)1293 assert prequalificationorder['code'] == 2001294 return prequalificationorder1295 def test_prequalification_124(self):1296 print('å¥ç»ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å æ£å¸¸çååå¤æ³¨')1297 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1298 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[7]1299 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1300 json.dumps(prequalificationdata))1301 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1302 print(prequalificationorder)1303 assert prequalificationorder['code'] == 2001304 return prequalificationorder1305 def test_prequalification_125(self):1306 print('å¥ç»ååæ´åä¼æ orderPreferensï¼ä¸ºç©º')1307 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1308 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[8]1309 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1310 json.dumps(prequalificationdata))1311 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1312 print(prequalificationorder)1313 assert prequalificationorder['code'] == 2001314 return prequalificationorder1315 def test_prequalification_126(self):1316 print('å¥ç»ååæ´åä¼æ ä¸ä¼ orderPreferens')1317 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1318 prequalificationdata = xymways.test_data.data_order.order_billing.billings_12()[9]1319 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1320 json.dumps(prequalificationdata))1321 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1322 print(prequalificationorder)1323 assert prequalificationorder['code'] == 2001324 return prequalificationorder1325 # æå¡è´¹ååæ´åä¼æ 1326 def test_prequalification_127(self):1327 print('å¥ç»æ´åä¼æ å°789ï¼ ååä¸ç¹ä»·')1328 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1329 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[0]1330 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1331 json.dumps(prequalificationdata))1332 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1333 print(prequalificationorder)1334 assert prequalificationorder['code'] == 2001335 return prequalificationorder1336 def test_prequalification_128(self):1337 print('æå¡è´¹æ´åä¼æ å°789ï¼ ååç¹ä»·')1338 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1339 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[1]1340 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1341 json.dumps(prequalificationdata))1342 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1343 print(prequalificationorder)1344 assert prequalificationorder['code'] == 2001345 return prequalificationorder1346 def test_prequalification_129(self):1347 print('æå¡è´¹ååæ´åä¼æ å°0ï¼ ååä¸ç¹ä»·')1348 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1349 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[2]1350 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1351 json.dumps(prequalificationdata))1352 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1353 print(prequalificationorder)1354 assert prequalificationorder['code'] == 2510000101355 return prequalificationorder1356 def test_prequalification_130(self):1357 print('æå¡è´¹ååæ´åä¼æ å°0ï¼ ååç¹ä»·')1358 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1359 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[3]1360 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1361 json.dumps(prequalificationdata))1362 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1363 print(prequalificationorder)1364 assert prequalificationorder['code'] == 2510000101365 return prequalificationorder1366 def test_prequalification_131(self):1367 print('æå¡è´¹ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååä¸ç¹ä»·')1368 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1369 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[4]1370 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1371 json.dumps(prequalificationdata))1372 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1373 print(prequalificationorder)1374 assert prequalificationorder['code'] == 2001375 return prequalificationorder1376 def test_prequalification_132(self):1377 print('æå¡è´¹ååæ´åä¼æ å°æ¯åä»·å¤§ï¼ ååç¹ä»·')1378 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1379 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[5]1380 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1381 json.dumps(prequalificationdata))1382 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1383 print(prequalificationorder)1384 assert prequalificationorder['code'] != 2001385 return prequalificationorder1386 def test_prequalification_133(self):1387 print('æå¡è´¹ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å 大äºéå¶çååå¤æ³¨')1388 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1389 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[6]1390 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1391 json.dumps(prequalificationdata))1392 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1393 print(prequalificationorder)1394 assert prequalificationorder['code'] == 2001395 return prequalificationorder1396 def test_prequalification_134(self):1397 print('æå¡è´¹ååæ´åä¼æ å°789ï¼ ååä¸ç¹ä»·, æ·»å æ£å¸¸çååå¤æ³¨')1398 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1399 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[7]1400 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1401 json.dumps(prequalificationdata))1402 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1403 print(prequalificationorder)1404 assert prequalificationorder['code'] == 2001405 return prequalificationorder1406 def test_prequalification_135(self):1407 print('æå¡è´¹ååæ´åä¼æ orderPreferensï¼ä¸ºç©º')1408 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1409 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[8]1410 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1411 json.dumps(prequalificationdata))1412 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1413 print(prequalificationorder)1414 assert prequalificationorder['code'] == 2001415 return prequalificationorder1416 def test_prequalification_136(self):1417 print('æå¡è´¹ååæ´åä¼æ ä¸ä¼ orderPreferens')1418 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1419 prequalificationdata = xymways.test_data.data_order.order_billing.billings_13()[9]1420 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1421 json.dumps(prequalificationdata))1422 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1423 print(prequalificationorder)1424 assert prequalificationorder['code'] == 2001425 return prequalificationorder1426 # æ®éååä¸å¥ç»æ´åä¼æ 1427 def test_prequalification_137(self):1428 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10')1429 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1430 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[0]1431 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1432 json.dumps(prequalificationdata))1433 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1434 print(prequalificationorder)1435 assert prequalificationorder['code'] != 5001436 return prequalificationorder1437 def test_prequalification_138(self):1438 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10')1439 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1440 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[1]1441 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1442 json.dumps(prequalificationdata))1443 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1444 print(prequalificationorder)1445 assert prequalificationorder['code'] == 2001446 return prequalificationorder1447 def test_prequalification_139(self):1448 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°0')1449 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1450 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[2]1451 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1452 json.dumps(prequalificationdata))1453 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1454 print(prequalificationorder)1455 assert prequalificationorder['code'] == 2510000101456 return prequalificationorder1457 def test_prequalification_140(self):1458 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10000')1459 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1460 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[3]1461 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1462 json.dumps(prequalificationdata))1463 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1464 print(prequalificationorder)1465 assert prequalificationorder['code'] != 5001466 return prequalificationorder1467 def test_prequalification_141(self):1468 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10000')1469 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1470 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[4]1471 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1472 json.dumps(prequalificationdata))1473 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1474 print(prequalificationorder)1475 assert prequalificationorder['code'] == 2001476 return prequalificationorder1477 def test_prequalification_142(self):1478 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°0')1479 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1480 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[5]1481 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1482 json.dumps(prequalificationdata))1483 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1484 print(prequalificationorder)1485 assert prequalificationorder['code'] == 2510000101486 return prequalificationorder1487 def test_prequalification_143(self):1488 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°0')1489 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1490 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[6]1491 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1492 json.dumps(prequalificationdata))1493 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1494 print(prequalificationorder)1495 assert prequalificationorder['code'] != 2001496 return prequalificationorder1497 def test_prequalification_144(self):1498 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°0')1499 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1500 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[7]1501 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1502 json.dumps(prequalificationdata))1503 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1504 print(prequalificationorder)1505 assert prequalificationorder['code'] != 2001506 return prequalificationorder1507 def test_prequalification_145(self):1508 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°10000')1509 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1510 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[8]1511 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1512 json.dumps(prequalificationdata))1513 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1514 print(prequalificationorder)1515 assert prequalificationorder['code'] == 2001516 return prequalificationorder1517 def test_prequalification_146(self):1518 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°10000')1519 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1520 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[9]1521 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1522 json.dumps(prequalificationdata))1523 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1524 print(prequalificationorder)1525 assert prequalificationorder['code'] == 2001526 return prequalificationorder1527 def test_prequalification_147(self):1528 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°10')1529 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1530 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[10]1531 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1532 json.dumps(prequalificationdata))1533 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1534 print(prequalificationorder)1535 assert prequalificationorder['code'] == 2001536 return prequalificationorder1537 def test_prequalification_148(self):1538 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°10')1539 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1540 prequalificationdata = xymways.test_data.data_order.order_billing.billings_14()[11]1541 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1542 json.dumps(prequalificationdata))1543 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1544 print(prequalificationorder)1545 assert prequalificationorder['code'] == 2001546 return prequalificationorder1547 # '''1548 # æ®éååä¸æå¡è´¹æ´åä¼æ 1549 def test_prequalification_149(self):1550 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10')1551 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1552 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[0]1553 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1554 json.dumps(prequalificationdata))1555 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1556 print(prequalificationorder)1557 assert prequalificationorder['code'] != 5001558 return prequalificationorder1559 def test_prequalification_150(self):1560 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10')1561 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1562 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[1]1563 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1564 json.dumps(prequalificationdata))1565 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1566 print(prequalificationorder)1567 assert prequalificationorder['code'] == 2001568 return prequalificationorder1569 def test_prequalification_151(self):1570 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°0')1571 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1572 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[2]1573 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1574 json.dumps(prequalificationdata))1575 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1576 print(prequalificationorder)1577 assert prequalificationorder['code'] == 2510000101578 return prequalificationorder1579 def test_prequalification_152(self):1580 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10000')1581 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1582 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[3]1583 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1584 json.dumps(prequalificationdata))1585 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1586 print(prequalificationorder)1587 assert prequalificationorder['code'] != 5001588 return prequalificationorder1589 def test_prequalification_153(self):1590 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10000')1591 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1592 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[4]1593 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1594 json.dumps(prequalificationdata))1595 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1596 print(prequalificationorder)1597 assert prequalificationorder['code'] == 2001598 return prequalificationorder1599 def test_prequalification_154(self):1600 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°0')1601 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1602 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[5]1603 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1604 json.dumps(prequalificationdata))1605 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1606 print(prequalificationorder)1607 assert prequalificationorder['code'] == 2510000101608 return prequalificationorder1609 def test_prequalification_155(self):1610 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°0')1611 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1612 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[6]1613 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1614 json.dumps(prequalificationdata))1615 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1616 print(prequalificationorder)1617 assert prequalificationorder['code'] != 2001618 return prequalificationorder1619 def test_prequalification_156(self):1620 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åä¼æ å°0')1621 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1622 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[7]1623 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1624 json.dumps(prequalificationdata))1625 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1626 print(prequalificationorder)1627 assert prequalificationorder['code'] != 2001628 return prequalificationorder1629 def test_prequalification_157(self):1630 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åä¼æ å°10000')1631 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1632 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[8]1633 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1634 json.dumps(prequalificationdata))1635 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1636 print(prequalificationorder)1637 assert prequalificationorder['code'] == 2001638 return prequalificationorder1639 def test_prequalification_158(self):1640 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°10000')1641 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1642 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[9]1643 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1644 json.dumps(prequalificationdata))1645 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1646 print(prequalificationorder)1647 assert prequalificationorder['code'] == 2001648 return prequalificationorder1649 def test_prequalification_159(self):1650 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åä¼æ å°10')1651 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1652 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[10]1653 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1654 json.dumps(prequalificationdata))1655 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1656 print(prequalificationorder)1657 assert prequalificationorder['code'] == 2001658 return prequalificationorder1659 def test_prequalification_160(self):1660 print('ä¸åå æ´»å¨ï¼æ®éç¹ä»·ï¼æ´åä¼æ å°10')1661 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1662 prequalificationdata = xymways.test_data.data_order.order_billing.billings_15()[11]1663 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1664 json.dumps(prequalificationdata))1665 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1666 print(prequalificationorder)1667 assert prequalificationorder['code'] == 2001668 return prequalificationorder1669 # æå¡è´¹ä¸å¥ç»è´¦åä¼æ 1670 def test_prequalification_161(self):1671 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10')1672 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1673 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[0]1674 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1675 json.dumps(prequalificationdata))1676 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1677 print(prequalificationorder)1678 assert prequalificationorder['code'] != 5001679 return prequalificationorder1680 def test_prequalification_162(self):1681 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10')1682 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1683 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[1]1684 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1685 json.dumps(prequalificationdata))1686 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1687 print(prequalificationorder)1688 assert prequalificationorder['code'] == 2001689 return prequalificationorder1690 def test_prequalification_163(self):1691 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°0')1692 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1693 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[2]1694 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1695 json.dumps(prequalificationdata))1696 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1697 print(prequalificationorder)1698 assert prequalificationorder['code'] == 2510000101699 return prequalificationorder1700 def test_prequalification_164(self):1701 print('ä¸åå æ´»å¨ï¼ååé½ç¹ä»·ï¼æ´åä¼æ å°10000')1702 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1703 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[3]1704 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1705 json.dumps(prequalificationdata))1706 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1707 print(prequalificationorder)1708 assert prequalificationorder['code'] != 5001709 return prequalificationorder1710 def test_prequalification_165(self):1711 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°10000')1712 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1713 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[4]1714 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1715 json.dumps(prequalificationdata))1716 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1717 print(prequalificationorder)1718 assert prequalificationorder['code'] == 2001719 return prequalificationorder1720 def test_prequalification_166(self):1721 print('ä¸åå æ´»å¨ï¼ååé½ä¸ç¹ä»·ï¼æ´åä¼æ å°0')1722 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1723 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[5]1724 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1725 json.dumps(prequalificationdata))1726 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1727 print(prequalificationorder)1728 assert prequalificationorder['code'] == 2510000101729 return prequalificationorder1730 def test_prequalification_167(self):1731 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åä¼æ å°0')1732 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1733 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[6]1734 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1735 json.dumps(prequalificationdata))1736 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1737 print(prequalificationorder)1738 assert prequalificationorder['code'] != 2001739 return prequalificationorder1740 def test_prequalification_168(self):1741 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°0')1742 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1743 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[7]1744 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1745 json.dumps(prequalificationdata))1746 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1747 print(prequalificationorder)1748 assert prequalificationorder['code'] != 2001749 return prequalificationorder1750 def test_prequalification_169(self):1751 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°10000')1752 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1753 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[8]1754 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1755 json.dumps(prequalificationdata))1756 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1757 print(prequalificationorder)1758 assert prequalificationorder['code'] == 2001759 return prequalificationorder1760 def test_prequalification_170(self):1761 print('ä¸åå æ´»å¨ï¼æå¡è´¹ç¹ä»·ï¼æ´åä¼æ å°10000')1762 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1763 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[9]1764 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1765 json.dumps(prequalificationdata))1766 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1767 print(prequalificationorder)1768 assert prequalificationorder['code'] == 2001769 return prequalificationorder1770 def test_prequalification_171(self):1771 print('ä¸åå æ´»å¨ï¼å¥ç»ç¹ä»·ï¼æ´åä¼æ å°10')1772 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1773 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[10]1774 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1775 json.dumps(prequalificationdata))1776 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1777 print(prequalificationorder)1778 assert prequalificationorder['code'] == 2001779 return prequalificationorder1780 def test_prequalification_172(self):1781 print('ä¸åå æ´»å¨ï¼æå¡ä¸ºç¹ä»·ï¼æ´åä¼æ å°10')1782 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'1783 prequalificationdata = xymways.test_data.data_order.order_billing.billings_16()[11]1784 prequalificationorder = run.run_main(prequalificationurl, 'POST', header_merchant,1785 json.dumps(prequalificationdata))1786 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])1787 print(prequalificationorder)1788 assert prequalificationorder['code'] == 2001789 return prequalificationorder1790# 订åæ¥è¯¢1791# åæ·è®¢åæ¥è¯¢1792class Test_order_query():1793 # æ¥è¯¢åæ·å
¨é¨è®¢å1794 def test_query_order(self):1795 global paging1796 paging = xymways.test_data.data_order.order_query().paging()1797 print('æµè¯æ¥è¯¢åæ·å
¨é¨è®¢å')1798 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1799 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1800 queryorderl = '&orderStatusLists=3000,3005,4000,4001,5000,6000,8000,9000,9001,9002,9003,9004,9999'1801 queryorderurl = queryorderu + queryorderr + queryorderl1802 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1803 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] == 2001804 # print(run.run_main(queryorderurl, 'POST', header_merchant))1805 print(len(queryorder))1806 ordernos = []1807 for conid in range(0, len(queryorder)):1808 ordernos.append(queryorder[conid]['orderNo'])1809 print(ordernos)1810 return ordernos1811 # æ¥è¯¢åæ·å¾
æ¯ä»è®¢å1812 def test_query_order_tbpaid(self):1813 print('æµè¯æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')1814 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1815 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1816 queryorderl = '&orderStatusLists=3000'1817 queryorderurl = queryorderu + queryorderr + queryorderl1818 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1819 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001820 print(len(queryorder))1821 ordernos = []1822 for conid in range(0, len(queryorder)):1823 ordernos.append(queryorder[conid]['orderNo'])1824 print(ordernos)1825 return ordernos1826 # æ¥è¯¢åæ·å¾
é¢å®¡è®¢å1827 def test_query_order_tbprequal(self):1828 print('æµè¯æ¥è¯¢åæ·å¾
é¢å®¡è®¢å')1829 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1830 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1831 queryorderl = '&orderStatusLists=3005'1832 queryorderurl = queryorderu + queryorderr + queryorderl1833 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1834 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001835 # print(len(queryorder), queryorder[0]['orderNo'])1836 ordernos = []1837 for conid in range(0, len(queryorder)):1838 ordernos.append(queryorder[conid]['orderNo'])1839 return ordernos1840 # æ¥è¯¢åæ·é¡¾å®¢ç¾å订å1841 def test_query_order_customeraut(self):1842 print('æµè¯æ¥è¯¢åæ·é¡¾å®¢ç¾å订å')1843 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1844 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1845 queryorderl = '&orderStatusLists=4000'1846 queryorderurl = queryorderu + queryorderr + queryorderl1847 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1848 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001849 # print(len(queryorder), queryorder[0]['orderNo'])1850 ordernos = []1851 for conid in range(0, len(queryorder)):1852 ordernos.append(queryorder[conid]['orderNo'])1853 return ordernos1854 # æ¥è¯¢åæ·åæ·å¾
ç¾å订å1855 def test_query_order_merchantaut(self):1856 print('æµè¯æ¥è¯¢åæ·åæ·å¾
ç¾å订å')1857 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1858 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1859 queryorderl = '&orderStatusLists=4001'1860 queryorderurl = queryorderu + queryorderr + queryorderl1861 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1862 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001863 # print(len(queryorder), queryorder[0]['orderNo'])1864 ordernos = []1865 for conid in range(0, len(queryorder)):1866 ordernos.append(queryorder[conid]['orderNo'])1867 return ordernos1868 # æ¥è¯¢åæ·å¾
å®æ订å1869 def test_query_order_tbcompleted(self):1870 print('æµè¯æ¥è¯¢åæ·å¾
å®æ订å')1871 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1872 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1873 queryorderl = '&orderStatusLists=5000'1874 queryorderurl = queryorderu + queryorderr + queryorderl1875 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1876 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001877 # print(len(queryorder), queryorder[0]['orderNo'])1878 ordernos = []1879 for conid in range(0, len(queryorder)):1880 ordernos.append(queryorder[conid]['orderNo'])1881 return ordernos1882 # æ¥è¯¢åæ·å·²å®æ订å1883 def test_query_orde_completed(self):1884 print('æµè¯æ¥è¯¢åæ·å
¨é¨è®¢å')1885 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1886 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1887 queryorderl = '&orderStatusLists=6000'1888 queryorderurl = queryorderu + queryorderr + queryorderl1889 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1890 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001891 # print(len(queryorder), queryorder[0]['orderNo'])1892 ordernos = []1893 for conid in range(0, len(queryorder)):1894 ordernos.append(queryorder[conid]['orderNo'])1895 return ordernos1896 # æ¥è¯¢åæ·å·²é货订å1897 def test_query_order_returned(self):1898 print('æµè¯æ¥è¯¢åæ·å·²é货订å')1899 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1900 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1901 queryorderl = '&orderStatusLists=8000'1902 queryorderurl = queryorderu + queryorderr + queryorderl1903 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1904 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001905 # print(len(queryorder), queryorder[0]['orderNo'])1906 ordernos = []1907 for conid in range(0, len(queryorder)):1908 ordernos.append(queryorder[conid]['orderNo'])1909 return ordernos1910 # æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å1911 def test_query_order_tbreviewed(self):1912 print('æµè¯æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å')1913 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1914 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1915 queryorderl = '&orderStatusLists=9000'1916 queryorderurl = queryorderu + queryorderr + queryorderl1917 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1918 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001919 # print(len(queryorder), queryorder[0]['orderNo'])1920 ordernos = []1921 for conid in range(0, len(queryorder)):1922 ordernos.append(queryorder[conid]['orderNo'])1923 return ordernos1924 # æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å1925 def test_query_order_auditfailed(self):1926 print('æµè¯æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å')1927 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1928 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1929 queryorderl = '&orderStatusLists=9001'1930 queryorderurl = queryorderu + queryorderr + queryorderl1931 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1932 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001933 # print(len(queryorder), queryorder[0]['orderNo'])1934 ordernos = []1935 for conid in range(0, len(queryorder)):1936 ordernos.append(queryorder[conid]['orderNo'])1937 return ordernos1938 # æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å1939 def test_query_order_modifycustomer(self):1940 print('æµè¯æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')1941 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1942 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1943 queryorderl = '&orderStatusLists=9002'1944 queryorderurl = queryorderu + queryorderr + queryorderl1945 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1946 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001947 # print(len(queryorder), queryorder[0]['orderNo'])1948 ordernos = []1949 for conid in range(0, len(queryorder)):1950 ordernos.append(queryorder[conid]['orderNo'])1951 return ordernos1952 # æ¥è¯¢åæ·å¾
æ¯ä»è®¢å1953 def test_query_order_modifymerchant(self):1954 print('æµè¯æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')1955 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1956 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1957 queryorderl = '&orderStatusLists=9003'1958 queryorderurl = queryorderu + queryorderr + queryorderl1959 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1960 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001961 # print(len(queryorder), queryorder[0]['orderNo'])1962 ordernos = []1963 for conid in range(0, len(queryorder)):1964 ordernos.append(queryorder[conid]['orderNo'])1965 return ordernos1966 # æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å1967 def test_query_order_passprequal(self):1968 print('æµè¯æ¥è¯¢åæ·é¢å®¡å®¡æ ¸ä¸éè¿è®¢å')1969 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1970 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1971 queryorderl = '&orderStatusLists=9004'1972 queryorderurl = queryorderu + queryorderr + queryorderl1973 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1974 # print(len(queryorder), queryorder[0]['orderNo'])1975 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001976 ordernos = []1977 for conid in range(0, len(queryorder)):1978 ordernos.append(queryorder[conid]['orderNo'])1979 return ordernos1980 # æ¥è¯¢åæ·å·²éå订å1981 def test_query_order_chargeback(self):1982 """ç¾åº¦æç´¢æ¥å£"""1983 print('æµè¯æ¥è¯¢åæ·å·²éå订å')1984 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1985 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1986 queryorderl = '&orderStatusLists=9999'1987 queryorderurl = queryorderu + queryorderr + queryorderl1988 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']1989 # print(len(queryorder), queryorder[0]['orderNo'])1990 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5001991 ordernos = []1992 for conid in range(0, len(queryorder)):1993 ordernos.append(queryorder[conid]['orderNo'])1994 return ordernos1995 # åæ¶åæ·å
¨é¨å¾
æ¯ä»è®¢å(æ¶é´æ®µä¹å
)1996 def test_paid(self):1997 iop = Test_order_query().test_query_order_tbpaid()1998 # print(iop)1999 # print(len(iop))2000 for i in range(0, len(iop)):2001 tobepaidu = 'http://api.xymtest.com/merchant/store/order/manage/cancel?orderNo='2002 tobepaidr = iop[i]2003 tobepaidurl = tobepaidu + tobepaidr2004 tobepaidorde = run.run_main(tobepaidurl, 'POST', header_merchant)2005 assert tobepaidorde['code'] != 5002006 # 顾客å§åå
¨é¨æ¥è¯¢2007 def test_query_order_01(self):2008 global paging2009 paging = xymways.test_data.data_order.order_query().paging()2010 print('æµè¯æ¥è¯¢åæ·å
¨é¨è®¢å')2011 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2012 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2013 queryorderl = '&orderStatusLists=3000,3005,4000,4001,5000,6000,8000,9000,9001,9002,9003,9004,9999'2014 queryorderurl = queryorderu + queryorderr + queryorderl2015 print(queryorderurl)2016 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2017 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] == 2002018 # print(run.run_main(queryorderurl, 'POST', header_merchant))2019 print(len(queryorder))2020 ordernos = []2021 for conid in range(0, len(queryorder)):2022 ordernos.append(queryorder[conid]['orderNo'])2023 print(ordernos)2024 return ordernos2025 # 顾客å§åæ¥è¯¢åæ·å¾
æ¯ä»è®¢å2026 def test_query_order_tbpaid_02(self):2027 print('顾客å§åæ¥è¯¢åæ·å¾
æ¯ä»è®¢å')2028 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2029 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2030 queryorderl = '&orderStatusLists=3000'2031 queryorderurl = queryorderu + queryorderr + queryorderl2032 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2033 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002034 print(len(queryorder))2035 ordernos = []2036 for conid in range(0, len(queryorder)):2037 ordernos.append(queryorder[conid]['orderNo'])2038 print(ordernos)2039 return ordernos2040 # 顾客å§åæ¥è¯¢åæ·å¾
é¢å®¡è®¢å2041 def test_query_order_tbprequal_03(self):2042 print('顾客å§åæ¥è¯¢åæ·å¾
é¢å®¡è®¢å')2043 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2044 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2045 queryorderl = '&orderStatusLists=3005'2046 queryorderurl = queryorderu + queryorderr + queryorderl2047 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2048 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002049 # print(len(queryorder), queryorder[0]['orderNo'])2050 ordernos = []2051 for conid in range(0, len(queryorder)):2052 ordernos.append(queryorder[conid]['orderNo'])2053 return ordernos2054 # 顾客å§åæ¥è¯¢åæ·é¡¾å®¢ç¾å订å2055 def test_query_order_customeraut_04(self):2056 print('顾客å§åæ¥è¯¢åæ·é¡¾å®¢ç¾å订å')2057 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2058 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2059 queryorderl = '&orderStatusLists=4000'2060 queryorderurl = queryorderu + queryorderr + queryorderl2061 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2062 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002063 # print(len(queryorder), queryorder[0]['orderNo'])2064 ordernos = []2065 for conid in range(0, len(queryorder)):2066 ordernos.append(queryorder[conid]['orderNo'])2067 return ordernos2068 # 顾客å§åæ¥è¯¢åæ·åæ·å¾
ç¾å订å2069 def test_query_order_merchantaut_05(self):2070 print('顾客å§åæ¥è¯¢åæ·åæ·å¾
ç¾å订å')2071 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2072 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2073 queryorderl = '&orderStatusLists=4001'2074 queryorderurl = queryorderu + queryorderr + queryorderl2075 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2076 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002077 # print(len(queryorder), queryorder[0]['orderNo'])2078 ordernos = []2079 for conid in range(0, len(queryorder)):2080 ordernos.append(queryorder[conid]['orderNo'])2081 return ordernos2082 # 顾客å§åæ¥è¯¢åæ·å¾
å®æ订å2083 def test_query_order_tbcompleted_06(self):2084 print('顾客å§åæ¥è¯¢åæ·å¾
å®æ订å')2085 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2086 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2087 queryorderl = '&orderStatusLists=5000'2088 queryorderurl = queryorderu + queryorderr + queryorderl2089 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2090 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002091 # print(len(queryorder), queryorder[0]['orderNo'])2092 ordernos = []2093 for conid in range(0, len(queryorder)):2094 ordernos.append(queryorder[conid]['orderNo'])2095 return ordernos2096 # 顾客å§åæ¥è¯¢åæ·å·²å®æ订å2097 def test_query_orde_completed_07(self):2098 print('顾客å§åæ¥è¯¢åæ·å·²å®æ订å')2099 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2100 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2101 queryorderl = '&orderStatusLists=6000'2102 queryorderurl = queryorderu + queryorderr + queryorderl2103 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2104 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002105 # print(len(queryorder), queryorder[0]['orderNo'])2106 ordernos = []2107 for conid in range(0, len(queryorder)):2108 ordernos.append(queryorder[conid]['orderNo'])2109 return ordernos2110 # 顾客å§åæ¥è¯¢åæ·å·²é货订å2111 def test_query_order_returned_08(self):2112 print('顾客å§åæ¥è¯¢åæ·å·²é货订å')2113 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2114 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2115 queryorderl = '&orderStatusLists=8000'2116 queryorderurl = queryorderu + queryorderr + queryorderl2117 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2118 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002119 # print(len(queryorder), queryorder[0]['orderNo'])2120 ordernos = []2121 for conid in range(0, len(queryorder)):2122 ordernos.append(queryorder[conid]['orderNo'])2123 return ordernos2124 # 顾客å§åæ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å2125 def test_query_order_tbreviewed_09(self):2126 print('顾客å§åæ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å')2127 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2128 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2129 queryorderl = '&orderStatusLists=9000'2130 queryorderurl = queryorderu + queryorderr + queryorderl2131 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2132 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002133 # print(len(queryorder), queryorder[0]['orderNo'])2134 ordernos = []2135 for conid in range(0, len(queryorder)):2136 ordernos.append(queryorder[conid]['orderNo'])2137 return ordernos2138 # 顾客å§åæ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å2139 def test_query_order_auditfailed_10(self):2140 print('顾客å§åæ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å')2141 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2142 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2143 queryorderl = '&orderStatusLists=9001'2144 queryorderurl = queryorderu + queryorderr + queryorderl2145 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2146 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002147 # print(len(queryorder), queryorder[0]['orderNo'])2148 ordernos = []2149 for conid in range(0, len(queryorder)):2150 ordernos.append(queryorder[conid]['orderNo'])2151 return ordernos2152 # 顾客å§åæ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å2153 def test_query_order_modifycustomer_11(self):2154 print('顾客å§åæ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')2155 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2156 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2157 queryorderl = '&orderStatusLists=9002'2158 queryorderurl = queryorderu + queryorderr + queryorderl2159 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2160 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002161 # print(len(queryorder), queryorder[0]['orderNo'])2162 ordernos = []2163 for conid in range(0, len(queryorder)):2164 ordernos.append(queryorder[conid]['orderNo'])2165 return ordernos2166 # 顾客å§åæ¥è¯¢åæ·å¾
æ¯ä»è®¢å2167 def test_query_order_modifymerchant_12(self):2168 print('顾客å§åæ¥è¯¢åæ·å¾
æ¯ä»è®¢å')2169 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2170 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2171 queryorderl = '&orderStatusLists=9003'2172 queryorderurl = queryorderu + queryorderr + queryorderl2173 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2174 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002175 # print(len(queryorder), queryorder[0]['orderNo'])2176 ordernos = []2177 for conid in range(0, len(queryorder)):2178 ordernos.append(queryorder[conid]['orderNo'])2179 return ordernos2180 # 顾客å§åæ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å2181 def test_query_order_passprequal_13(self):2182 print('顾客å§åæ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')2183 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2184 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2185 queryorderl = '&orderStatusLists=9004'2186 queryorderurl = queryorderu + queryorderr + queryorderl2187 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2188 # print(len(queryorder), queryorder[0]['orderNo'])2189 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002190 ordernos = []2191 for conid in range(0, len(queryorder)):2192 ordernos.append(queryorder[conid]['orderNo'])2193 return ordernos2194 # 顾客å§åæ¥è¯¢åæ·å·²éå订å2195 def test_query_order_chargeback_14(self):2196 """ç¾åº¦æç´¢æ¥å£"""2197 print('顾客å§åæ¥è¯¢åæ·å·²éå订å')2198 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2199 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&customName=' + paging[2] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2200 queryorderl = '&orderStatusLists=9999'2201 queryorderurl = queryorderu + queryorderr + queryorderl2202 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2203 # print(len(queryorder), queryorder[0]['orderNo'])2204 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002205 ordernos = []2206 for conid in range(0, len(queryorder)):2207 ordernos.append(queryorder[conid]['orderNo'])2208 return ordernos2209 # '''2210 # 顾客ææºå·å
¨é¨æ¥è¯¢2211 def test_query_order_15(self):2212 global paging2213 paging = xymways.test_data.data_order.order_query().paging()2214 print('顾客ææºå·åæ·å
¨é¨è®¢å')2215 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2216 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2217 queryorderl = '&orderStatusLists=3000,3005,4000,4001,5000,6000,8000,9000,9001,9002,9003,9004,9999'2218 queryorderurl = queryorderu + queryorderr + queryorderl2219 print(queryorderurl)2220 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2221 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] == 2002222 # print(run.run_main(queryorderurl, 'POST', header_merchant))2223 print(len(queryorder))2224 ordernos = []2225 for conid in range(0, len(queryorder)):2226 ordernos.append(queryorder[conid]['orderNo'])2227 print(ordernos)2228 return ordernos2229 # 顾客ææºå·æ¥è¯¢åæ·å¾
æ¯ä»è®¢å2230 def test_query_order_tbpaid_16(self):2231 print('顾客ææºå·æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')2232 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2233 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2234 queryorderl = '&orderStatusLists=3000'2235 queryorderurl = queryorderu + queryorderr + queryorderl2236 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2237 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002238 print(len(queryorder))2239 ordernos = []2240 for conid in range(0, len(queryorder)):2241 ordernos.append(queryorder[conid]['orderNo'])2242 print(ordernos)2243 return ordernos2244 # 顾客ææºå·æ¥è¯¢åæ·å¾
é¢å®¡è®¢å2245 def test_query_order_tbprequal_17(self):2246 print('顾客ææºå·æ¥è¯¢åæ·å¾
é¢å®¡è®¢å')2247 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2248 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2249 queryorderl = '&orderStatusLists=3005'2250 queryorderurl = queryorderu + queryorderr + queryorderl2251 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2252 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002253 # print(len(queryorder), queryorder[0]['orderNo'])2254 ordernos = []2255 for conid in range(0, len(queryorder)):2256 ordernos.append(queryorder[conid]['orderNo'])2257 return ordernos2258 # 顾客ææºå·æ¥è¯¢åæ·é¡¾å®¢ç¾å订å2259 def test_query_order_customeraut_18(self):2260 print('顾客ææºå·æ¥è¯¢åæ·é¡¾å®¢ç¾å订å')2261 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2262 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2263 queryorderl = '&orderStatusLists=4000'2264 queryorderurl = queryorderu + queryorderr + queryorderl2265 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2266 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002267 # print(len(queryorder), queryorder[0]['orderNo'])2268 ordernos = []2269 for conid in range(0, len(queryorder)):2270 ordernos.append(queryorder[conid]['orderNo'])2271 return ordernos2272 # 顾客ææºå·æ¥è¯¢åæ·åæ·å¾
ç¾å订å2273 def test_query_order_merchantaut_19(self):2274 print('顾客ææºå·æ¥è¯¢åæ·åæ·å¾
ç¾å订å')2275 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2276 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2277 queryorderl = '&orderStatusLists=4001'2278 queryorderurl = queryorderu + queryorderr + queryorderl2279 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2280 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002281 # print(len(queryorder), queryorder[0]['orderNo'])2282 ordernos = []2283 for conid in range(0, len(queryorder)):2284 ordernos.append(queryorder[conid]['orderNo'])2285 return ordernos2286 # 顾客ææºå·æ¥è¯¢åæ·å¾
å®æ订å2287 def test_query_order_tbcompleted_20(self):2288 print('顾客ææºå·æ¥è¯¢åæ·å¾
å®æ订å')2289 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2290 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2291 queryorderl = '&orderStatusLists=5000'2292 queryorderurl = queryorderu + queryorderr + queryorderl2293 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2294 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002295 # print(len(queryorder), queryorder[0]['orderNo'])2296 ordernos = []2297 for conid in range(0, len(queryorder)):2298 ordernos.append(queryorder[conid]['orderNo'])2299 return ordernos2300 # 顾客ææºå·æ¥è¯¢åæ·å·²å®æ订å2301 def test_query_orde_completed_21(self):2302 print('顾客ææºå·æ¥è¯¢åæ·å·²å®æ订å')2303 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2304 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2305 queryorderl = '&orderStatusLists=6000'2306 queryorderurl = queryorderu + queryorderr + queryorderl2307 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2308 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002309 # print(len(queryorder), queryorder[0]['orderNo'])2310 ordernos = []2311 for conid in range(0, len(queryorder)):2312 ordernos.append(queryorder[conid]['orderNo'])2313 return ordernos2314 # 顾客ææºå·æ¥è¯¢åæ·å·²é货订å2315 def test_query_order_returned_22(self):2316 print('顾客ææºå·æ¥è¯¢åæ·å·²é货订å')2317 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2318 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2319 queryorderl = '&orderStatusLists=8000'2320 queryorderurl = queryorderu + queryorderr + queryorderl2321 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2322 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002323 # print(len(queryorder), queryorder[0]['orderNo'])2324 ordernos = []2325 for conid in range(0, len(queryorder)):2326 ordernos.append(queryorder[conid]['orderNo'])2327 return ordernos2328 # 顾客ææºå·æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å2329 def test_query_order_tbreviewed_23(self):2330 print('顾客ææºå·æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å')2331 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2332 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2333 queryorderl = '&orderStatusLists=9000'2334 queryorderurl = queryorderu + queryorderr + queryorderl2335 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2336 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002337 # print(len(queryorder), queryorder[0]['orderNo'])2338 ordernos = []2339 for conid in range(0, len(queryorder)):2340 ordernos.append(queryorder[conid]['orderNo'])2341 return ordernos2342 # 顾客ææºå·æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å2343 def test_query_order_auditfailed_24(self):2344 print('顾客ææºå·æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å')2345 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2346 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2347 queryorderl = '&orderStatusLists=9001'2348 queryorderurl = queryorderu + queryorderr + queryorderl2349 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2350 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002351 # print(len(queryorder), queryorder[0]['orderNo'])2352 ordernos = []2353 for conid in range(0, len(queryorder)):2354 ordernos.append(queryorder[conid]['orderNo'])2355 return ordernos2356 # 顾客ææºå·æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å2357 def test_query_order_modifycustomer_25(self):2358 print('顾客ææºå·æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')2359 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2360 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2361 queryorderl = '&orderStatusLists=9002'2362 queryorderurl = queryorderu + queryorderr + queryorderl2363 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2364 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002365 # print(len(queryorder), queryorder[0]['orderNo'])2366 ordernos = []2367 for conid in range(0, len(queryorder)):2368 ordernos.append(queryorder[conid]['orderNo'])2369 return ordernos2370 # 顾客ææºå·æ¥è¯¢åæ·å¾
æ¯ä»è®¢å2371 def test_query_order_modifymerchant_26(self):2372 print('顾客ææºå·æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')2373 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2374 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2375 queryorderl = '&orderStatusLists=9003'2376 queryorderurl = queryorderu + queryorderr + queryorderl2377 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2378 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002379 # print(len(queryorder), queryorder[0]['orderNo'])2380 ordernos = []2381 for conid in range(0, len(queryorder)):2382 ordernos.append(queryorder[conid]['orderNo'])2383 return ordernos2384 # 顾客ææºå·æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å2385 def test_query_order_passprequal_27(self):2386 print('顾客ææºå·æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')2387 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2388 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2389 queryorderl = '&orderStatusLists=9004'2390 queryorderurl = queryorderu + queryorderr + queryorderl2391 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2392 # print(len(queryorder), queryorder[0]['orderNo'])2393 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002394 ordernos = []2395 for conid in range(0, len(queryorder)):2396 ordernos.append(queryorder[conid]['orderNo'])2397 return ordernos2398 # 顾客ææºå·æ¥è¯¢åæ·å·²éå订å2399 def test_query_order_chargeback_28(self):2400 """ç¾åº¦æç´¢æ¥å£"""2401 print('顾客ææºå·æ¥è¯¢åæ·å·²éå订å')2402 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='2403 queryorderr = json.dumps(paging[0]) + '&pageSize=' + json.dumps(paging[1]) + '&mobile=' + paging[3] + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime2404 queryorderl = '&orderStatusLists=9999'2405 queryorderurl = queryorderu + queryorderr + queryorderl2406 queryorder = run.run_main(queryorderurl, 'POST', header_merchant)['data']['list']2407 # print(len(queryorder), queryorder[0]['orderNo'])2408 assert run.run_main(queryorderurl, 'POST', header_merchant)['code'] != 5002409 ordernos = []2410 for conid in range(0, len(queryorder)):2411 ordernos.append(queryorder[conid]['orderNo'])...
test_order_activity.py
Source:test_order_activity.py
...24 'openPreAudit': 'false',25 'skipAfterPreAudit': 'false',26 'openAiAudit': 'false'27 }28 ress = run.run_main(url, 'POST', headers, data)29 print(ress)30 assert ress['code'] == 20031 assertion.assertions(self, contrast=200, passvalue=ress['code'])32 # å¼å¯è®¢åååºé¢å®¡33 def order_qpproval_authority_02(self):34 url = 'http://api.xymtest.com/mall/order/audit/switch'35 data = {36 'openAudit': 'false',37 'openPreAudit': 'true',38 'skipAfterPreAudit': 'false',39 'openAiAudit': 'false'40 }41 ress = run.run_main(url, 'POST', headers, data)42 assert ress['code'] == 20043 # å¼å¯è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸44 def order_qpproval_authority_03(self):45 url = 'http://api.xymtest.com/mall/order/audit/switch'46 data = {47 'openAudit': 'false',48 'openPreAudit': 'false',49 'skipAfterPreAudit': 'true',50 'openAiAudit': 'false'51 }52 ress = run.run_main(url, 'POST', headers, data)53 assert ress['code'] == 20054 # å¼å¯è®¢åAIèªå¨å®¡æ ¸55 def order_qpproval_authority_04(self):56 url = 'http://api.xymtest.com/mall/order/audit/switch'57 data = {58 'openAudit': 'false',59 'openPreAudit': 'false',60 'skipAfterPreAudit': 'false',61 'openAiAudit': 'true'62 }63 ress = run.run_main(url, 'POST', headers, data)64 assert ress['code'] == 20065 # å¼å¯è®¢åååºå®¡æ ¸, å¼å¯è®¢åååºé¢å®¡66 def order_qpproval_authority_05(self):67 url = 'http://api.xymtest.com/mall/order/audit/switch'68 data = {69 'openAudit': 'true',70 'openPreAudit': 'true',71 'skipAfterPreAudit': 'false',72 'openAiAudit': 'false'73 }74 ress = run.run_main(url, 'POST', headers, data)75 assert ress['code'] == 20076 # å¼å¯è®¢åååºå®¡æ ¸, å¼å¯è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸77 def order_qpproval_authority_06(self):78 url = 'http://api.xymtest.com/mall/order/audit/switch'79 data = {80 'openAudit': 'true',81 'openPreAudit': 'false',82 'skipAfterPreAudit': 'true',83 'openAiAudit': 'false'84 }85 ress = run.run_main(url, 'POST', headers, data)86 assert ress['code'] == 20087 # å¼å¯è®¢åååºå®¡æ ¸, å¼å¯è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸88 def order_qpproval_authority_07(self):89 url = 'http://api.xymtest.com/mall/order/audit/switch'90 data = {91 'openAudit': 'true',92 'openPreAudit': 'false',93 'skipAfterPreAudit': 'false',94 'openAiAudit': 'true'95 }96 ress = run.run_main(url, 'POST', headers, data)97 assert ress['code'] == 20098 # å¼å¯è®¢åååºé¢å®¡ï¼è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸99 def order_qpproval_authority_08(self):100 url = 'http://api.xymtest.com/mall/order/audit/switch'101 data = {102 'openAudit': 'false',103 'openPreAudit': 'true',104 'skipAfterPreAudit': 'true',105 'openAiAudit': 'false'106 }107 ress = run.run_main(url, 'POST', headers, data)108 assert ress['code'] == 200109 # 订åé¢å®¡åæ¯è·³è¿å®¡æ ¸ï¼å¼å¯è®¢åAIèªå¨å®¡æ ¸110 def order_qpproval_authority_09(self):111 url = 'http://api.xymtest.com/mall/order/audit/switch'112 data = {113 'openAudit': 'false',114 'openPreAudit': 'true',115 'skipAfterPreAudit': 'false',116 'openAiAudit': 'true'117 }118 ress = run.run_main(url, 'POST', headers, data)119 assert ress['code'] == 200120 # å¼å¯è®¢åAIèªå¨å®¡æ ¸ï¼è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸121 def order_qpproval_authority_10(self):122 url = 'http://api.xymtest.com/mall/order/audit/switch'123 data = {124 'openAudit': 'false',125 'openPreAudit': 'false',126 'skipAfterPreAudit': 'true',127 'openAiAudit': 'true'128 }129 ress = run.run_main(url, 'POST', headers, data)130 assert ress['code'] == 200131 # å¼å¯è®¢åååºå®¡æ ¸, å¼å¯è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸ï¼ å¼å¯è®¢åååºé¢å®¡132 def order_qpproval_authority_11(self):133 url = 'http://api.xymtest.com/mall/order/audit/switch'134 data = {135 'openAudit': 'true',136 'openPreAudit': 'true',137 'skipAfterPreAudit': 'true',138 'openAiAudit': 'false'139 }140 ress = run.run_main(url, 'POST', headers, data)141 assert ress['code'] == 200142 # å¼å¯è®¢åååºé¢å®¡ï¼è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸ï¼å¼å¯è®¢åAIèªå¨å®¡æ ¸143 def order_qpproval_authority_12(self):144 url = 'http://api.xymtest.com/mall/order/audit/switch'145 data = {146 'openAudit': 'false',147 'openPreAudit': 'true',148 'skipAfterPreAudit': 'true',149 'openAiAudit': 'true'150 }151 ress = run.run_main(url, 'POST', headers, data)152 assert ress['code'] == 200153 # å¼å¯è®¢åååºå®¡æ ¸ï¼å¼å¯è®¢åååºé¢å®¡ï¼è®¢åé¢å®¡åæ¯è·³è¿å®¡æ ¸ï¼å¼å¯è®¢åAIèªå¨å®¡æ ¸154 def order_qpproval_authority_13(self):155 url = 'http://api.xymtest.com/mall/order/audit/switch'156 data = {157 'openAudit': 'true',158 'openPreAudit': 'true',159 'skipAfterPreAudit': 'true',160 'openAiAudit': 'true'161 }162 ress = run.run_main(url, 'POST', headers, data)163 assert ress['code'] == 200164 # ä¸å¼å¯è®¢åååºå®¡æ ¸ï¼ä¸å¼å¯è®¢åååºé¢å®¡ï¼è®¢åé¢å®¡åä¸è·³è¿å®¡æ ¸ï¼ä¸å¼å¯è®¢åAIèªå¨å®¡æ ¸165 def order_qpproval_authority_14(self):166 url = 'http://api.xymtest.com/mall/order/audit/switch'167 data = {168 'openAudit': 'false',169 'openPreAudit': 'false',170 'skipAfterPreAudit': 'false',171 'openAiAudit': 'false'172 }173 ress = run.run_main(url, 'POST', headers, data)174 assert ress['code'] == 200175# åæ·è®¢åå¼å176class order(unittest.TestCase):177 ''' åæ·æ°ç¨æ·å¼å '''178 def newuser(self):179 '''建ç«æ°ç¨æ·'''180 global newcustid, newname181 ul = 'http://api.xymtest.com/merchant/store/order/manage/custom/add?customName=' + xym.test_cases.test_fee_data.fee_one_data.billing['newname']182 rl = '&mobile=' + xym.test_cases.test_fee_data.fee_one_data.billing['newnumber']183 url = ul + rl184 assert run.run_main(url, 'POST', headers)['code'] == 200185 newcustid = run.run_main(url, 'POST', headers)['data']['custId']186 newname = xym.test_cases.test_fee_data.fee_one_data.billing['newname']187 return newcustid, newname188 def newaddress(self):189 '''建ç«æ°ç¨æ·å°å'''190 url = 'http://api.xymtest.com/merchant/store/order/open/add/custom/address'191 data = {192 'mobile': xym.test_cases.test_fee_data.fee_one_data.billing['newnumber'],193 'receiver': newname,194 'customId': newcustid,195 'isDel': 0,196 'addType': 1000,197 'address': "天津å¸å¸è¾åºæ²³ä¸åºé¢è¯·é®",198 'areaName': "天津å¸å¸è¾åºæ²³ä¸åº",199 'addBlockDTO': {'blockName': "é¢", 'areaName': "天津å¸å¸è¾åºæ²³ä¸åº", 'areaId': "120102"},200 'houseNo': "请é®",201 'isDefault': 0202 }203 newaddressorder = run.run_main(url, 'POST', headers, data)204 assert newaddressorder['code'] == 200205 '''åæ·èç¨æ·å¼å'''206 # å¼åèç¨æ·æ¥è¯¢207 def order_user(self):208 global customid209 useru = 'http://api.xymtest.com/merchant/store/order/manage/get/custom/info?mobile='210 userr = xym.test_cases.test_fee_data.fee_one_data.billing['phonenumber']211 useeurl = useru + userr212 orderuser = run.run_main(useeurl, 'GET', headers)213 assertion.assertions(self, contrast=200, passvalue=orderuser['code'])214 assert orderuser['code'] != 500215 # print(orderuser)216 customid = orderuser['data'][0]['custId']217 realName = orderuser['data'][0]['realName']218 pan = orderuser['data']219 # print('顾客custid:', customid)220 return customid, realName, pan221 # æ¥è¯¢å°å¼åèç¨æ·çå°å222 def order_address(self):223 addressu = 'http://api.xymtest.com/merchant/store/order/open/distribution?customId='224 addressr = json.dumps(customid)225 addressurl = addressu + addressr226 addressdata = {227 "customId": customid228 }229 orderaddress = run.run_main(addressurl, 'POST', headers)230 assertion.assertions(self, contrast=200, passvalue=orderaddress['code'])231 assert orderaddress['code'] != 500232 # print('顾客å°åï¼', orderaddress)233 address = orderaddress['data']['address'][0]['addId']234 return address235 # æ¥è¯¢å¼åç¨æ·ä¼åå¡236 def order_card(self):237 global cardid, cardtype238 cardu = 'http://api.xymtest.com/merchant/custom/member/card/query/list?customId='239 cardr = json.dumps(customid)240 cardl = '&orderId='241 cardurl = cardu + cardr + cardl242 ordercard = run.run_main(cardurl, 'GET', headers)243 assert ordercard['code'] != 500244 # print(ordercard)245 # æ ¹æ®éè¦çèåå¡æ¥è¿è¡è¿ååæ°246 membershipcard = ordercard['data']247 for cardId in membershipcard:248 if cardId['cardName'] == xym.test_cases.test_fee_data.fee_one_data.billing['card']:249 cardid = cardId['cardId']250 cardtype = cardId['cardType']251 # print('顾客ä¼åå¡customId:', cardid, '\n顾客ä¼åå¡ç±»åï¼', cardtype)252 break253 return cardId254 # æ¥è¯¢æå
³èçæ´»å¨255 def activities(self):256 activitiesu = 'http://api.xymtest.com/merchant/store/order/manage/activity/list?customId=' + json.dumps(customid)257 activitiesr = '&cardId=' + cardid258 activitiesl = '&cardType=' + cardtype259 activitiesurl = activitiesu + activitiesr + activitiesl260 # print(activitiesurl)261 activitiesorder = run.run_main(activitiesurl, 'GET', headers)262 print(activitiesorder)263 assert activitiesorder['code'] != 500264 return activitiesorder265 '''åæ·å¼å'''266 # å¼å¸¸å¼å267 def prequalification_001(self):268 print('001ä¸æ·»å åå顾客å¼å')269 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'270 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[0]271 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))272 # print(prequalificationorder)273 assert prequalificationorder['message'] == '订åè³å°å
å«ä¸ä»¶åå'274 return prequalificationorder275 def prequalification_002(self):276 print('002å¼åååæ¶è´§ï¼ä½ä¸å¡«åæ¶è´§å°å')277 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'278 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[1]279 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))280 assertion.assertions(self, contrast='请添å éè´§å°å', passvalue=prequalificationorder['message'])281 # print(prequalificationorder)282 # assert prequalificationorder['code'] == 200283 return prequalificationorder284 def prequalification_003(self):285 print('003å¼åä¸æ¶è´§ï¼åå¡«åæ¶è´§å°å')286 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'287 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[2]288 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))289 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])290 assert prequalificationorder['code'] == 200291 # print(prequalificationorder)292 return prequalificationorder293 def prequalification_004(self):294 print('004没æç¨æ·å¼å')295 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'296 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[3]297 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))298 assertion.assertions(self, contrast='请填åè´è´§äººä¿¡æ¯', passvalue=prequalificationorder['message'])299 print(prequalificationorder)300 # assert prequalificationorder['code'] != 500301 return prequalificationorder302 def prequalification_005(self):303 print('005ç¨æ·æ²¡æä¼åå¡å¼å')304 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'305 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[4]306 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))307 assertion.assertions(self, contrast='请éæ©ä¼åå¡', passvalue=prequalificationorder['message'])308 # print(prequalificationorder)309 # assert prequalificationorder['code'] != 500310 return prequalificationorder311 def prequalification_006(self):312 print('006å¼åç¨æ·æ²¡æ顾客å§å')313 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'314 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[5]315 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))316 assertion.assertions(self, contrast='请填å顾客å§å', passvalue=prequalificationorder['message'])317 # print(prequalificationorder)318 # assert prequalificationorder['code'] != 500319 return prequalificationorder320 def prequalification_007(self):321 print('007å¼åä¸å¡«é¢è®¡å®ææ¶é´')322 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'323 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[6]324 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))325 assertion.assertions(self, contrast='订åé¢è®¡å®ææ¶é´ä¸å¯ä¸ºç©º', passvalue=prequalificationorder['message'])326 # print(prequalificationorder)327 # assert prequalificationorder['code'] != 500328 return prequalificationorder329 def prequalification_008(self):330 print('008å¼åé¢è®¡å®ææ¶é´å¡«ä»å¤©ä¹å')331 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'332 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[7]333 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))334 assertion.assertions(self, contrast='订åé¢è®¡å®ææ¶é´éä»å¤©æ以å', passvalue=prequalificationorder['message'])335 # print(prequalificationorder)336 # assert prequalificationorder['code'] != 500337 return prequalificationorder338 def prequalification_009(self):339 print('009订åç¨å
¶å®åºéºååå¼å')340 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'341 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[8]342 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))343 assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])344 print(prequalificationorder)345 # assert prequalificationorder['code'] != 500346 return prequalificationorder347 def prequalification_010(self):348 print('009订åç¨å
¶å®åºéºååå¼å')349 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'350 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_01()[9]351 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))352 assertion.assertions(self, contrast=500, passvalue=prequalificationorder['code'])353 print(prequalificationorder)354 # assert prequalificationorder['code'] != 500355 return prequalificationorder356 # æ£å¸¸å¼å357 def prequalification_01(self):358 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个æ®éååå¼å')359 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'360 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[0]361 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))362 # assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])363 print(prequalificationorder)364 assert prequalificationorder['code'] == 200365 return prequalificationorder366 def prequalification_02(self):367 print('ä¸åå æ´»å¨,ééè´§ï¼å个æ®éååå¼å')368 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'369 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[1]370 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))371 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])372 assert prequalificationorder['code'] == 200373 return prequalificationorder374 def prequalification_03(self):375 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个å¥ç»åå¼å')376 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'377 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[2]378 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))379 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])380 assert prequalificationorder['code'] != 500381 return prequalificationorder382 def prequalification_04(self):383 print('ä¸åå æ´»å¨,ä¸ééè´§ï¼å个æå¡è´¹ç¨åååå¼å')384 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'385 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[3]386 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))387 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])388 assert prequalificationorder['code'] != 500389 return prequalificationorder390 def prequalification_05(self):391 print('ä¸åå æ´»å¨,å¤ä¸ªæ®éååå¼å')392 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'393 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[4]394 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))395 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])396 assert prequalificationorder['code'] != 500397 return prequalificationorder398 def prequalification_06(self):399 print('ä¸åå æ´»å¨,å¤ä¸ªå¥ç»ååå¼å')400 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'401 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[4]402 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))403 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])404 assert prequalificationorder['code'] != 500405 return prequalificationorder406 def prequalification_07(self):407 print('ä¸åå æ´»å¨,å¤ä¸ªæå¡è´¹ååå¼å')408 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'409 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[6]410 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))411 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])412 assert prequalificationorder['code'] != 500413 return prequalificationorder414 def prequalification_08(self):415 print('ä¸åå æ´»å¨ï¼ æ®éååä¸å¥ç»å¼å')416 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'417 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[7]418 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))419 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])420 assert prequalificationorder['code'] != 500421 return prequalificationorder422 def prequalification_09(self):423 print('ä¸åå æ´»å¨ï¼ æ®éååä¸æå¡è´¹å¼å')424 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'425 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[8]426 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))427 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])428 assert prequalificationorder['code'] != 500429 return prequalificationorder430 def prequalification_10(self):431 print('ä¸åå æ´»å¨ï¼ å¥ç»ä¸æå¡å¼å')432 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'433 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings()[9]434 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))435 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])436 assert prequalificationorder['code'] != 500437 return prequalificationorder438 # 订åç¹ä»·å¼å439 # æ®éåå440 def prequalification_11(self):441 print('æ®éååç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')442 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'443 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[0]444 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))445 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])446 assert prequalificationorder['code'] != 500447 return prequalificationorder448 def prequalification_12(self):449 print('æ®éååç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')450 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'451 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[1]452 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))453 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])454 assert prequalificationorder['code'] != 500455 return prequalificationorder456 def prequalification_13(self):457 print('æ®éååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')458 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'459 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[2]460 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))461 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])462 assert prequalificationorder['code'] != 500463 return prequalificationorder464 def prequalification_14(self):465 print('æ®éååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')466 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'467 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[3]468 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))469 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])470 assert prequalificationorder['code'] != 500471 return prequalificationorder472 def prequalification_15(self):473 print('æ®éååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')474 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'475 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[4]476 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))477 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])478 assert prequalificationorder['code'] != 500479 return prequalificationorder480 def prequalification_16(self):481 print('æ®éååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')482 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'483 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[5]484 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))485 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])486 assert prequalificationorder['code'] != 500487 return prequalificationorder488 def prequalification_17(self):489 print('æ®éååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')490 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'491 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[6]492 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))493 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])494 assert prequalificationorder['code'] != 500495 return prequalificationorder496 def prequalification_18(self):497 print('æ®éååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')498 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'499 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[7]500 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))501 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])502 assert prequalificationorder['code'] != 500503 return prequalificationorder504 def prequalification_19(self):505 print('ä¸æ®éååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')506 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'507 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[8]508 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))509 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])510 assert prequalificationorder['code'] != 500511 return prequalificationorder512 def prequalification_20(self):513 print('æ®éååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')514 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'515 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_02()[9]516 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))517 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])518 assert prequalificationorder['code'] != 500519 return prequalificationorder520 # å¥ç»521 def prequalification_21(self):522 print('å¥ç»ååç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')523 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'524 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[0]525 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))526 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])527 assert prequalificationorder['code'] != 500528 return prequalificationorder529 def prequalification_22(self):530 print('å¥ç»ååç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')531 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'532 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[1]533 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))534 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])535 assert prequalificationorder['code'] != 500536 return prequalificationorder537 def prequalification_23(self):538 print('å¥ç»ååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')539 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'540 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[2]541 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))542 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])543 assert prequalificationorder['code'] != 500544 return prequalificationorder545 def prequalification_24(self):546 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')547 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'548 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[3]549 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))550 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])551 assert prequalificationorder['code'] != 500552 return prequalificationorder553 def prequalification_25(self):554 print('å¥ç»ååç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')555 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'556 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[4]557 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))558 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])559 assert prequalificationorder['code'] != 500560 return prequalificationorder561 def prequalification_26(self):562 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')563 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'564 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[5]565 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))566 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])567 assert prequalificationorder['code'] != 500568 return prequalificationorder569 def prequalification_27(self):570 print('å¥ç»ååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')571 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'572 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[6]573 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))574 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])575 assert prequalificationorder['code'] != 500576 return prequalificationorder577 def prequalification_28(self):578 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')579 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'580 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[7]581 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))582 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])583 assert prequalificationorder['code'] != 500584 return prequalificationorder585 def prequalification_29(self):586 print('å¥ç»ååç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')587 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'588 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[8]589 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))590 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])591 assert prequalificationorder['code'] != 500592 return prequalificationorder593 def prequalification_30(self):594 print('å¥ç»ååä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')595 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'596 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_03()[9]597 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))598 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])599 assert prequalificationorder['code'] != 500600 return prequalificationorder601 # æå¡è´¹ç¨602 def prequalification_31(self):603 print('æå¡è´¹ç¹ä»·ï¼ä¸ææï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')604 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'605 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[0]606 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))607 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])608 assert prequalificationorder['code'] != 500609 return prequalificationorder610 def prequalification_32(self):611 print('æå¡è´¹ç¹ä»·ï¼ä¸ææï¼å¼å,éè´§,å
³éé¢å®¡')612 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'613 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[1]614 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))615 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])616 assert prequalificationorder['code'] != 500617 return prequalificationorder618 def prequalification_33(self):619 print('æå¡è´¹ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')620 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'621 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[2]622 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))623 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])624 assert prequalificationorder['code'] != 500625 return prequalificationorder626 def prequalification_34(self):627 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')628 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'629 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[3]630 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))631 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])632 assert prequalificationorder['code'] != 500633 return prequalificationorder634 def prequalification_35(self):635 print('æå¡è´¹ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')636 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'637 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[4]638 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))639 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])640 assert prequalificationorder['code'] != 500641 return prequalificationorder642 def prequalification_36(self):643 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为0ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')644 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'645 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[5]646 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))647 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])648 assert prequalificationorder['code'] != 500649 return prequalificationorder650 def prequalification_37(self):651 print('æå¡è´¹ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')652 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'653 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[6]654 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))655 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])656 assert prequalificationorder['code'] != 500657 return prequalificationorder658 def prequalification_38(self):659 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å¼å¯é¢å®¡')660 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'661 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[7]662 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))663 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])664 assert prequalificationorder['code'] != 500665 return prequalificationorder666 def prequalification_39(self):667 print('æå¡è´¹ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')668 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'669 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[8]670 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))671 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])672 assert prequalificationorder['code'] != 500673 return prequalificationorder674 def prequalification_40(self):675 print('æå¡è´¹ä¸ç¹ä»·ï¼ååææ为1.5ï¼å¼å,ä¸éè´§,å
³éé¢å®¡')676 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'677 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[9]678 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))679 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])680 assert prequalificationorder['code'] != 500681 return prequalificationorder682 # æ®éååæ´åææ683 def prequalification_41(self):684 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')685 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'686 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[0]687 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))688 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])689 assert prequalificationorder['code'] != 500690 return prequalificationorder691 def prequalification_42(self):692 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1æï¼')693 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'694 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[1]695 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))696 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])697 assert prequalificationorder['code'] != 500698 return prequalificationorder699 def prequalification_43(self):700 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')701 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'702 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[2]703 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))704 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])705 assert prequalificationorder['code'] != 500706 return prequalificationorder707 def prequalification_44(self):708 print('æ®éåå(ç¹ä»·ï¼æ´åææ(0æï¼')709 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'710 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[3]711 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))712 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])713 assert prequalificationorder['code'] != 500714 return prequalificationorder715 def prequalification_45(self):716 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')717 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'718 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[4]719 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))720 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])721 # print(prequalificationorder)722 assert prequalificationorder['code'] != 500723 return prequalificationorder724 def prequalification_46(self):725 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')726 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'727 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[5]728 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))729 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])730 assert prequalificationorder['code'] != 500731 return prequalificationorder732 def prequalification_47(self):733 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')734 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'735 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[6]736 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))737 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])738 assert prequalificationorder['code'] != 500739 return prequalificationorder740 def prequalification_48(self):741 print('æ®éåå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')742 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'743 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[7]744 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))745 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])746 assert prequalificationorder['code'] != 500747 return prequalificationorder748 def prequalification_49(self):749 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')750 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'751 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[8]752 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))753 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])754 assert prequalificationorder['code'] != 500755 return prequalificationorder756 def prequalification_50(self):757 print('æ®éåå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')758 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'759 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_05()[9]760 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))761 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])762 assert prequalificationorder['code'] != 500763 return prequalificationorder764 # æå¡è´¹æ´åææ765 def prequalification_51(self):766 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')767 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'768 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_06()[0]769 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))770 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])771 assert prequalificationorder['code'] != 500772 return prequalificationorder773 def prequalification_52(self):774 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1æï¼')775 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'776 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_06()[1]777 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))778 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])779 # print(prequalificationorder)780 assert prequalificationorder['code'] != 500781 return prequalificationorder782 def prequalification_53(self):783 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')784 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'785 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[0]786 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))787 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])788 assert prequalificationorder['code'] != 500789 return prequalificationorder790 def prequalification_54(self):791 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(0æï¼')792 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'793 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[1]794 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))795 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])796 assert prequalificationorder['code'] != 500797 return prequalificationorder798 def prequalification_55(self):799 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')800 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'801 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[0]802 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))803 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])804 assert prequalificationorder['code'] != 500805 return prequalificationorder806 def prequalification_56(self):807 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')808 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'809 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[1]810 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))811 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])812 assert prequalificationorder['code'] != 500813 return prequalificationorder814 def prequalification_57(self):815 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')816 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'817 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[0]818 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))819 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])820 assert prequalificationorder['code'] != 500821 return prequalificationorder822 def prequalification_58(self):823 print('æå¡è´¹åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')824 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'825 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[1]826 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))827 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])828 assert prequalificationorder['code'] != 500829 return prequalificationorder830 def prequalification_59(self):831 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')832 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'833 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[0]834 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))835 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])836 assert prequalificationorder['code'] != 500837 return prequalificationorder838 def prequalification_60(self):839 print('æå¡è´¹åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')840 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'841 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_04()[1]842 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))843 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])844 assert prequalificationorder['code'] != 500845 return prequalificationorder846 # å¥ç»ååæ´åææ847 def prequalification_61(self):848 print('ä¸åå æ´»å¨ï¼ å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1æï¼')849 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'850 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[0]851 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))852 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])853 assert prequalificationorder['code'] != 500854 return prequalificationorder855 def prequalification_62(self):856 print('ä¸åå æ´»å¨ï¼ å¥ç»åå(ç¹ä»·ï¼æ´åææ(1æï¼')857 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'858 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[1]859 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))860 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])861 # print(prequalificationorder)862 assert prequalificationorder['code'] != 500863 return prequalificationorder864 def prequalification_63(self):865 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(0æï¼')866 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'867 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[2]868 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))869 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])870 assert prequalificationorder['code'] != 500871 return prequalificationorder872 def prequalification_64(self):873 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(0æï¼')874 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'875 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[3]876 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))877 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])878 assert prequalificationorder['code'] != 500879 return prequalificationorder880 def prequalification_65(self):881 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')882 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'883 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[4]884 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))885 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])886 assert prequalificationorder['code'] != 500887 return prequalificationorder888 def prequalification_66(self):889 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååä¸è®¢åé件')890 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'891 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[5]892 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))893 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])894 assert prequalificationorder['code'] != 500895 return prequalificationorder896 def prequalification_67(self):897 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')898 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'899 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[6]900 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))901 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])902 assert prequalificationorder['code'] != 500903 return prequalificationorder904 def prequalification_68(self):905 print('å¥ç»åå(ä¸ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')906 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'907 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[7]908 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))909 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])910 assert prequalificationorder['code'] != 500911 return prequalificationorder912 def prequalification_69(self):913 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å ååé件')914 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'915 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[8]916 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))917 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])918 assert prequalificationorder['code'] != 500919 return prequalificationorder920 def prequalification_70(self):921 print('å¥ç»åå(ç¹ä»·ï¼æ´åææ(1.2æï¼å¼å¯é¢å®¡ï¼æ·»å 订åé件')922 prequalificationurl = 'http://api.xymtest.com/merchant/store/order/open/create'923 prequalificationdata = xym.test_cases.test_fee_data.fee_order_data.billings_07()[9]924 prequalificationorder = run.run_main(prequalificationurl, 'POST', headers, json.dumps(prequalificationdata))925 assertion.assertions(self, contrast=200, passvalue=prequalificationorder['code'])926 assert prequalificationorder['code'] != 500927 return prequalificationorder928 # æ¥è¯¢è®¢å929 global saleStartTime, saleEndTime930 # å
è·å¾æ¶é´æ°ç»æ ¼å¼çæ¥æ931 threeDayAgo = (datetime.datetime.now() - datetime.timedelta(days=7))932 threeDay = (datetime.datetime.now() + datetime.timedelta(days=7))933 # 转æ¢ä¸ºå
¶ä»åç¬¦ä¸²æ ¼å¼934 saleStartTime = threeDayAgo.strftime("%Y-%m-%d")935 saleEndTime = threeDay.strftime("%Y-%m-%d")936 # æ¥è¯¢åæ·å
¨é¨è®¢å937 def query_order(self):938 print('æµè¯æ¥è¯¢åæ·å
¨é¨è®¢å')939 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='940 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime941 queryorderl = '&orderStatusLists=3000,3005,4000,4001,5000,6000,8000,9000,9001,9002,9003,9004,9999'942 queryorderurl = queryorderu + queryorderr + queryorderl943 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']944 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 500945 # print(len(queryorder), queryorder[0]['orderNo'])946 ordernos = []947 for conid in range(0, len(queryorder)):948 ordernos.append(queryorder[conid]['orderNo'])949 return ordernos950 # æ¥è¯¢åæ·å¾
æ¯ä»è®¢å951 def query_order_tbpaid(self):952 print('æµè¯æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')953 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='954 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(955 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime956 queryorderl = '&orderStatusLists=3000'957 queryorderurl = queryorderu + queryorderr + queryorderl958 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']959 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 500960 # print(len(queryorder), queryorder[0]['orderNo'])961 ordernos = []962 for conid in range(0, len(queryorder)):963 ordernos.append(queryorder[conid]['orderNo'])964 return ordernos965 # æ¥è¯¢åæ·å¾
é¢å®¡è®¢å966 def query_order_tbprequal(self):967 print('æµè¯æ¥è¯¢åæ·å¾
é¢å®¡è®¢å')968 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='969 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(970 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime971 queryorderl = '&orderStatusLists=3005'972 queryorderurl = queryorderu + queryorderr + queryorderl973 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']974 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 500975 # print(len(queryorder), queryorder[0]['orderNo'])976 ordernos = []977 for conid in range(0, len(queryorder)):978 ordernos.append(queryorder[conid]['orderNo'])979 return ordernos980 # æ¥è¯¢åæ·é¡¾å®¢ç¾å订å981 def query_order_customeraut(self):982 print('æµè¯æ¥è¯¢åæ·é¡¾å®¢ç¾å订å')983 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='984 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(985 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime986 queryorderl = '&orderStatusLists=4000'987 queryorderurl = queryorderu + queryorderr + queryorderl988 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']989 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 500990 # print(len(queryorder), queryorder[0]['orderNo'])991 ordernos = []992 for conid in range(0, len(queryorder)):993 ordernos.append(queryorder[conid]['orderNo'])994 return ordernos995 # æ¥è¯¢åæ·åæ·å¾
ç¾å订å996 def query_order_merchantaut(self):997 print('æµè¯æ¥è¯¢åæ·åæ·å¾
ç¾å订å')998 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='999 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1000 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1001 queryorderl = '&orderStatusLists=4001'1002 queryorderurl = queryorderu + queryorderr + queryorderl1003 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1004 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001005 # print(len(queryorder), queryorder[0]['orderNo'])1006 ordernos = []1007 for conid in range(0, len(queryorder)):1008 ordernos.append(queryorder[conid]['orderNo'])1009 return ordernos1010 # æ¥è¯¢åæ·å¾
å®æ订å1011 def query_order_tbcompleted(self):1012 print('æµè¯æ¥è¯¢åæ·å¾
å®æ订å')1013 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1014 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1015 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1016 queryorderl = '&orderStatusLists=5000'1017 queryorderurl = queryorderu + queryorderr + queryorderl1018 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1019 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001020 # print(len(queryorder), queryorder[0]['orderNo'])1021 ordernos = []1022 for conid in range(0, len(queryorder)):1023 ordernos.append(queryorder[conid]['orderNo'])1024 return ordernos1025 # æ¥è¯¢åæ·å·²å®æ订å1026 def query_orde_completed(self):1027 print('æµè¯æ¥è¯¢åæ·å
¨é¨è®¢å')1028 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1029 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1030 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1031 queryorderl = '&orderStatusLists=6000'1032 queryorderurl = queryorderu + queryorderr + queryorderl1033 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1034 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001035 # print(len(queryorder), queryorder[0]['orderNo'])1036 ordernos = []1037 for conid in range(0, len(queryorder)):1038 ordernos.append(queryorder[conid]['orderNo'])1039 return ordernos1040 # æ¥è¯¢åæ·å·²é货订å1041 def query_order_returned(self):1042 print('æµè¯æ¥è¯¢åæ·å·²é货订å')1043 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1044 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1045 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1046 queryorderl = '&orderStatusLists=8000'1047 queryorderurl = queryorderu + queryorderr + queryorderl1048 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1049 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001050 # print(len(queryorder), queryorder[0]['orderNo'])1051 ordernos = []1052 for conid in range(0, len(queryorder)):1053 ordernos.append(queryorder[conid]['orderNo'])1054 return ordernos1055 # æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å1056 def query_order_tbreviewed(self):1057 print('æµè¯æ¥è¯¢åæ·å¾
å®¡æ ¸è®¢å')1058 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1059 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1060 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1061 queryorderl = '&orderStatusLists=9000'1062 queryorderurl = queryorderu + queryorderr + queryorderl1063 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1064 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001065 # print(len(queryorder), queryorder[0]['orderNo'])1066 ordernos = []1067 for conid in range(0, len(queryorder)):1068 ordernos.append(queryorder[conid]['orderNo'])1069 return ordernos1070 # æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å1071 def query_order_auditfailed(self):1072 print('æµè¯æ¥è¯¢åæ·å®¡æ ¸ä¸éè¿è®¢å')1073 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1074 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1075 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1076 queryorderl = '&orderStatusLists=9001'1077 queryorderurl = queryorderu + queryorderr + queryorderl1078 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1079 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001080 # print(len(queryorder), queryorder[0]['orderNo'])1081 ordernos = []1082 for conid in range(0, len(queryorder)):1083 ordernos.append(queryorder[conid]['orderNo'])1084 return ordernos1085 # æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å1086 def query_order_modifycustomer(self):1087 print('æµè¯æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å')1088 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1089 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1090 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1091 queryorderl = '&orderStatusLists=9002'1092 queryorderurl = queryorderu + queryorderr + queryorderl1093 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1094 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001095 # print(len(queryorder), queryorder[0]['orderNo'])1096 ordernos = []1097 for conid in range(0, len(queryorder)):1098 ordernos.append(queryorder[conid]['orderNo'])1099 return ordernos1100 # æ¥è¯¢åæ·å¾
æ¯ä»è®¢å1101 def query_order_modifymerchant(self):1102 """sajfioawjefio"""1103 print('æµè¯æ¥è¯¢åæ·å¾
æ¯ä»è®¢å')1104 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1105 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1106 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1107 queryorderl = '&orderStatusLists=9003'1108 queryorderurl = queryorderu + queryorderr + queryorderl1109 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1110 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001111 # print(len(queryorder), queryorder[0]['orderNo'])1112 ordernos = []1113 for conid in range(0, len(queryorder)):1114 ordernos.append(queryorder[conid]['orderNo'])1115 return ordernos1116 # æ¥è¯¢åæ·ä¿®æ¹è®¢å顾客å¾
确认订å1117 def query_order_passprequal(self):1118 """sfopaweopf"""1119 print('æµè¯æ¥è¯¢åæ·é¢å®¡å®¡æ ¸ä¸éè¿è®¢å')1120 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1121 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1122 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1123 queryorderl = '&orderStatusLists=9004'1124 queryorderurl = queryorderu + queryorderr + queryorderl1125 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1126 # print(len(queryorder), queryorder[0]['orderNo'])1127 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001128 ordernos = []1129 for conid in range(0, len(queryorder)):1130 ordernos.append(queryorder[conid]['orderNo'])1131 return ordernos1132 # æ¥è¯¢åæ·å·²éå订å1133 def query_order_chargeback(self):1134 """ç¾åº¦æç´¢æ¥å£"""1135 print('æµè¯æ¥è¯¢åæ·å·²éå订å')1136 queryorderu = 'http://api.xymtest.com/merchant/store/order/manage/page/list?pageNo='1137 queryorderr = json.dumps(onedata.orderstatus['pageNo']) + '&pageSize=' + json.dumps(1138 onedata.orderstatus['pageSize']) + '&saleStartTime=' + saleStartTime + '&saleEndTime=' + saleEndTime1139 queryorderl = '&orderStatusLists=9999'1140 queryorderurl = queryorderu + queryorderr + queryorderl1141 queryorder = run.run_main(queryorderurl, 'POST', headers)['data']['list']1142 # print(len(queryorder), queryorder[0]['orderNo'])1143 assert run.run_main(queryorderurl, 'POST', headers)['code'] != 5001144 ordernos = []1145 for conid in range(0, len(queryorder)):1146 ordernos.append(queryorder[conid]['orderNo'])1147 return ordernos1148 # åæ¶å¾
æ¯ä»è®¢å(è¿æä¸ç¬å¾
æ¯ä»è®¢åï¼1149 def tobepaid(self):1150 iop = order.query_order_tbpaid(self)1151 tobepaidu = 'http://api.xymtest.com/merchant/store/order/manage/cancel?orderNo='1152 tobepaidr = iop[0]1153 tobepaidurl = tobepaidu + tobepaidr1154 tobepaidorde = run.run_main(tobepaidurl, 'POST', headers)1155 assert tobepaidorde['code'] != 5001156 return tobepaidorde1157 # åæ¶åæ·å
¨é¨å¾
æ¯ä»è®¢å(æ¶é´æ®µä¹å
)1158 def paid(self):1159 iop = order.query_order_tbpaid(self)1160 # print(iop)1161 # print(len(iop))1162 for i in range(0, len(iop)):1163 tobepaidu = 'http://api.xymtest.com/merchant/store/order/manage/cancel?orderNo='1164 tobepaidr = iop[i]1165 tobepaidurl = tobepaidu + tobepaidr1166 tobepaidorde = run.run_main(tobepaidurl, 'POST', headers)...
test_cli_scan.py
Source:test_cli_scan.py
...24 def flush(self):25 for s in self._streams:26 s.flush()27VERBOSE = False28def run_main(*args):29 stdout = StringIO()30 stderr = StringIO()31 if VERBOSE:32 sys.stdout = SplitStream(sys.stdout, stdout) 33 sys.stderr = SplitStream(sys.stderr, stderr) 34 else:35 sys.stdout = stdout 36 sys.stderr = stderr37 try:38 try:39 ret = cli.main(args)40 finally:41 sys.stdout.flush()42 sys.stderr.flush()43 stdout.seek(0)44 stderr.seek(0)45 stdout = stdout.read().strip()46 stderr = stderr.read().strip()47 sys.stdout = sys.__stdout__48 sys.stderr = sys.__stderr__49 except Exception as exc:50 print("stdout:\n%s\nstderr:\n%s\ntraceback:\n%s" % (stdout,51 stderr, traceback.format_exc()), file=sys.stderr)52 exc.stdout = stdout53 exc.stderr = stderr54 raise 55 return (ret, stdout, stderr)56class TestCLI(unittest.TestCase):57 def test_help(self):58 ret, stdout, stderr = run_main('--help')59 self.assertEqual(ret, 0)60 self.assertTrue(stdout.startswith('NAME yara-ctypes'))61 def test_broken_opt(self):62 ret, stdout, stderr = run_main('--no-an-opt-opt')63 self.assertEqual(ret, -1)64 self.assertTrue("Getopt error:" in stderr)65 def test_list(self):66 ret, stdout, stderr = run_main('--list')67 self.assertEqual(ret, 0)68 self.assertTrue("example.foobar" in stdout)69class TestScan(unittest.TestCase):70 def test_select_yarafile(self):71 ret, stdout, stderr = run_main('-r', BIRD_YAR, '.')72 self.assertTrue("does not exist" not in stderr, msg="got %s" % stderr)73 self.assertEqual(ret, 0)74 ret, stdout, stderr = run_main('--rule=doesnotexist')75 self.assertEqual(ret, -1)76 self.assertTrue("does not exist" in stderr, msg="got %s" % stdout)77 def test_format(self):78 for fmt in ['pickle', 'json', 'pprint', 'marshal', 'dict']:79 try:80 ret, stdout, stderr = run_main('-r', BIRD_YAR, 81 '--fmt=%s' % fmt, BIRD_YAR)82 except Exception as exc:83 print(exc.stdout)84 print(exc.stderr)85 print(exc.error)86 raise87 self.assertEqual(ret, 0)88 self.assertTrue(stdout)89 self.assertTrue("scanned:1" in stderr)90 91 ret, stdout, stderr = run_main('--fmt=doesnotexist')92 self.assertTrue("unknown output format" in stderr)93 self.assertEqual(ret, -1)94 def test_whitelist(self):95 ret, stdout, stderr = run_main('--root=%s' % RULES_ROOT, 96 '--whitelist=meta', '--list')97 self.assertEqual(ret, 0)98 self.assertEqual("Rules + meta", stdout.strip()) 99 def test_blacklist(self):100 ret, stdout, stderr = run_main('--root=%s' % RULES_ROOT, 101 '--blacklist=extern,broken', '--list')102 self.assertEqual(ret, 0)103 self.assertTrue("broke" not in stdout) 104 def test_simple(self):105 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', BIRD_YAR)106 self.assertEqual(ret, 0)107 self.assertTrue("meta.yar: main.Bird01" in stdout)108 def test_root(self):109 ret, stdout, stderr = run_main('--root=doesnotexit')110 self.assertEqual(ret, -1)111 self.assertTrue("does not exist" in stderr)112 ret, stdout, stderr = run_main('--root=%s' % RULES_ROOT, '--list')113 self.assertEqual(ret, -1)114 self.assertTrue("You could blacklist the erroneous " in stderr)115 def test_chunk_size(self):116 ret, stdout, stderr = run_main('-r', BIRD_YAR, 117 '--chunk-size=10', '--mode=chunk',118 '--chunk-overlap=0',119 BIRD_YAR)120 self.assertTrue("meta.yar[150:160]" in stdout,121 msg="meta.yar[150:160] not in \nso=%s\nse=%s" % (stdout, stderr))122 self.assertEqual(ret, 0)123 ret, stdout, stderr = run_main('--chunk-size=a')124 self.assertEqual(ret, -1)125 self.assertEqual("param 'a' was not an int", stderr.strip())126 def test_readahead_limit(self):127 ret, stdout, stderr = run_main('-r', BIRD_YAR, 128 '--chunk-size=10', '--mode=chunk',129 '--chunk-overlap=0',130 '--readahead-limit=20', BIRD_YAR)131 self.assertTrue("meta.yar[150:160]" in stdout,132 msg="meta.yar[150:160] not in \nso=%s\nse=%s" % (stdout, stderr))133 self.assertEqual(ret, 0)134 ret, stdout, stderr = run_main('--readahead-limit=a')135 self.assertEqual(ret, -1)136 self.assertEqual("param 'a' was not an int", stderr.strip())137 def test_chunk_overlap(self):138 ret, stdout, stderr = run_main('-r', BIRD_YAR, 139 '--chunk-size=10', '--mode=chunk',140 '--readahead-limit=20', 141 '--chunk-overlap=0', '--simple',142 BIRD_YAR)143 self.assertTrue("meta.yar[150:160]" in stdout,144 msg="meta.yar[150:160] not in \nso=%s\nse=%s" % (stdout, stderr))145 self.assertEqual(ret, 0)146 ret, stdout, stderr = run_main('-r', BIRD_YAR, 147 '--chunk-size=16', '--mode=chunk',148 '--readahead-limit=20', 149 '--chunk-overlap=50', '--simple',150 BIRD_YAR)151 self.assertTrue("meta.yar[136:160]: main.Bird01" in stdout,152 msg="meta.yar[136:160]: main.Bird01 not in \nso=%s\nse=%s" % \153 (stdout, stderr))154 self.assertTrue("meta.yar[40:64]: main.Bird01" in stdout,155 msg="meta.yar[40:64]: main.Bird01 not in \nso=%s\nse=%s" % (stdout,156 stderr))157 self.assertEqual(ret, 0)158 159 ret, stdout, stderr = run_main('--chunk-overlap=a')160 self.assertEqual(ret, -1)161 self.assertEqual("param 'a' was not an int", stderr.strip())162 ret, stdout, stderr = run_main('--chunk-overlap=100')163 self.assertEqual(ret, -1)164 self.assertEqual("chunk-overlap value must be between 0 - 99",165 stderr.strip())166 ret, stdout, stderr = run_main('--chunk-overlap=-1')167 self.assertEqual(ret, -1)168 self.assertEqual("chunk-overlap value must be between 0 - 99",169 stderr.strip())170 def test_executepool(self):171 ret, stdout, stderr = run_main('--execute-pool=a')172 self.assertEqual(ret, -1)173 self.assertEqual("param 'a' was not an int", stderr.strip())174 ret, stdout, stderr = run_main('--execute-pool=0')175 self.assertEqual(ret, -1)176 self.assertEqual("--execute-pool value can not be lower than 1",177 stderr.strip())178 #TODO : this works in py2.x, py3x & pypy have a more sinister bug going on179 # deep below the cli180 def atest_externals(self):181 ret, stdout, stderr = run_main('-r', EXTERN_YAR, 182 '-d', 'ext_int_var=4', '-d', 'ext_bool_var=True', 183 '-d', 'ext_str_var="false"', BIRD_YAR)184 self.assertEqual(ret, 0)185 self.assertTrue("TestExternBool" in stdout)186 ret, stdout, stderr = run_main('-r', EXTERN_YAR, 187 '-d', 'ext_int_var=4', '-d', 'ext_bool_var=False', 188 '-d', 'ext_str_var="test"', BIRD_YAR)189 self.assertEqual(ret, 0)190 self.assertTrue("TestExternStr" in stdout)191 ret, stdout, stderr = run_main('-r', EXTERN_YAR, 192 '-d', 'ext_int_var=10', '-d', 'ext_bool_var=False', 193 '-d', 'ext_str_var="false"', BIRD_YAR)194 self.assertEqual(ret, 0)195 self.assertTrue("TestExternInt" in stdout)196 ret, stdout, stderr = run_main('-d', '44 broken')197 self.assertEqual(ret, -1)198 self.assertEqual("external '44 broken' syntax error", stderr.strip())199 def test_recurse_paths(self):200 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', RULES_ROOT)201 self.assertEqual(ret, 0)202 #self.assertEqual(len(stdout.splitlines()), 1)203 self.assertTrue("meta.yar: main.Bird01" in stdout,204 msg="meta.yar: main.Bird01 not in \nso=%s\nse=%s" % (stdout,205 stderr))206 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 207 '--recurse-dirs', RULES_ROOT)208 self.assertEqual(ret, 0)209 #self.assertEqual(len(stdout.splitlines()), 2)210 self.assertTrue("meta.yar: main.Bird01" in stdout)211 self.assertTrue("meta.yar: main.Bird01" in stdout)212 self.assertEqual(ret, 0)213 def test_mode_unknown(self):214 ret, stdout, stderr = run_main('--mode=undef')215 self.assertEqual("unknown mode undef", stderr.strip())216 self.assertEqual(ret, -1)217 def test_mode_file(self):218 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 219 '--mode=file', RULES_ROOT)220 self.assertEqual(ret, 0)221 #self.assertEqual(len(stdout.splitlines()), 1)222 self.assertTrue("meta.yar: main.Bird01" in stdout)223 def test_mode_stdin(self):224 with open(BIRD_YAR) as f:225 data = f.read()226 stream = StringIO(data)227 stream.isatty = lambda :True228 try:229 sys.stdin = stream 230 ret, stdout, stderr = run_main('-r', BIRD_YAR, 231 '--chunk-size=10', '--readahead-limit=20', 232 '--chunk-overlap=0', '--mode=stdin', 233 '--simple')234 self.assertTrue("stream[150:160]: main.Bird01" in stdout)235 self.assertEqual(ret, 0)236 finally:237 sys.stdin = sys.__stdin__238 def test_scan_filepath_does_not_exist(self):239 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 240 "paththatdoesnotexist")241 self.assertEqual(ret, -1)242 self.assertTrue("Error reading path 'paththatdoesnotexist'" in stderr)243 def test_globbed_path(self):244 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 245 "tests%s*.py" % os.path.sep)246 self.assertTrue("test_cli_scan.py: main.Bird01" in stdout)247 self.assertEqual(ret, 0)248 def test_mode_chunk(self):249 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 250 '--mode=chunk', RULES_ROOT)251 self.assertEqual(ret, 0)252 self.assertEqual(len(stdout.splitlines()), 1)253 self.assertTrue("meta.yar[0:225]: main.Bird01" in stdout)254 def test_path_end_include(self):255 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 256 '--recurse-dirs', 257 '--path-end-include=bird/meta.yar,rules/meta.yar',258 RULES_ROOT)259 self.assertTrue("scanned:2" in stderr)260 self.assertTrue("matches:2" in stderr,261 msg="matches:2 not in \nso=%s\nse=%s" % (stdout, stderr))262 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 263 '--recurse-dirs', 264 '--path-end-include=bird/meta.yar',265 RULES_ROOT)266 self.assertTrue("scanned:1" in stderr)267 self.assertTrue("matches:1" in stderr)268 def test_path_end_exclude(self):269 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 270 '--recurse-dirs', 271 '--path-end-exclude=.py,.pyc,.swp',272 TEST_ROOT)273 self.assertTrue("scanned:6" in stderr,274 msg = "scanned:6 not in \nso=%s\nse=%s" % (stdout, stderr))275 self.assertTrue("matches:2" in stderr)276 def test_path_contains_include(self):277 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 278 '--recurse-dirs', 279 '--path-contains-include=bird',280 RULES_ROOT)281 self.assertTrue("scanned:1" in stderr)282 self.assertTrue("matches:1" in stderr)283 def test_path_contains_exclude(self):284 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 285 '--recurse-dirs', 286 '--path-contains-exclude=bird',287 RULES_ROOT)288 self.assertTrue("matches:1" in stderr)289 self.assertTrue("scanned:5" in stderr, 290 msg="scanned:5 not in '%s'" % stderr)291 def test_filesize_lt(self):292 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 293 '--recurse-dirs', 294 '--exclude-filesize-lt=210',295 RULES_ROOT)296 self.assertTrue("rules/meta.yar: main.Bird01" in stdout)297 self.assertTrue("matches:1" in stderr)298 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 299 '--recurse-dirs', 300 '--exclude-filesize-lt=bad',301 RULES_ROOT)302 self.assertTrue(ret, -1)303 self.assertTrue("param 'bad' was not an int" in stderr)304 305 def test_filesize_gt(self):306 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 307 '--recurse-dirs', 308 '--exclude-filesize-gt=210',309 RULES_ROOT)310 self.assertTrue("rules/bird/meta.yar: main.Bird01" in stdout)311 self.assertTrue("matches:1" in stderr)312 ret, stdout, stderr = run_main('-r', BIRD_YAR, '--simple', 313 '--recurse-dirs', 314 '--exclude-filesize-gt=bad',315 RULES_ROOT)316 self.assertTrue(ret, -1)317 self.assertTrue("param 'bad' was not an int" in stderr)318class TestScanProcessPool(TestScan):319 def _run_main(self, *a):320 a = list(a)321 a.insert(0, '--execute-type=process')322 return self._orig_main(*a)323 def setUp(self):324 global run_main325 self._orig_main = run_main326 run_main = self._run_main327 def tearDown(self):328 global run_main...
test_base.py
Source:test_base.py
...40 versions = os.path.join(base_dir, dbname, 'versions')41 assert not os.listdir(versions)42def test_serve():43 with mock.patch("flask.Flask.run") as run:44 run_main(["serve"])45 run.assert_called_with(debug=True, port=5000)46def test_serve_all_interfaces():47 with mock.patch("flask.Flask.run") as run:48 run_main(["serve", "-a"])49 run.assert_called_with(debug=True, port=5000, host='0.0.0.0')50def test_serve_port():51 with mock.patch("flask.Flask.run") as run:52 run_main(["serve", "-p", "8010"])53 run.assert_called_with(debug=True, port=8010)54def test_serve_no_debug():55 with mock.patch("flask.Flask.run") as run:56 run_main(["serve", "--no-debug"])57 run.assert_called_with(debug=False, port=5000)58def test_createdb():59 settings = {'SQLALCHEMY_DATABASE_URIS': {}}60 for dbname in db._declarative_bases:61 settings['SQLALCHEMY_DATABASE_URIS'][dbname] = 'sqlite:///' # in-memory62 output = run_main(["createdb"], settings=settings)63 assert 'creating tables for database relengapi' in output64def test_repl_command():65 output = run_main(["repl", '-c', 'print(app)\nprint("hello world")'])66 assert 'relengapi.app' in output # from 'print(app)'67 assert 'hello world' in output # from 'print("hello world")'68def test_sqs_listen():69 # this doesn't do much more than see that the AWS method is called;70 # that method is tested elsewhere71 with mock.patch("relengapi.lib.aws.AWS._spawn_sqs_listeners") as p:72 run_main(["sqs-listen"], settings={})73 p.assert_called_with()74def test_invalid_database_name():75 """show an error when we specify an invalid database name """76 dbname = 'relengapi'77 settings = {'SQLALCHEMY_DATABASE_URIS': {}}78 for name in db._declarative_bases:79 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory80 run_main(["createdb"], settings=settings)81 with copy_alembic_folder(dbname) as base_dir:82 # create the revision83 output = run_main(["alembic", 'invalid_db_name', "--directory", base_dir, "revision"],84 settings=settings)85 assert "specify a valid database name" in output86def test_invalid_configuration():87 """ When specifying a valid db that hasn't been initialized, we spit out an error message"""88 dbname = 'relengapi'89 uninit_db = 'clobberer'90 settings = {'SQLALCHEMY_DATABASE_URIS': {}}91 for name in db._declarative_bases:92 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory93 run_main(["createdb"], settings=settings)94 with copy_alembic_folder(dbname) as base_dir:95 # create the revision96 output = run_main(["alembic", uninit_db, "--directory", base_dir, "revision"],97 settings=settings)98 assert "Configuration file does not exist" in output99def test_alembic_revision():100 """ When creating a revision, a migration script should exist with the current head"""101 dbname = 'relengapi'102 settings = {'SQLALCHEMY_DATABASE_URIS': {}}103 for name in db._declarative_bases:104 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory105 run_main(["createdb"], settings=settings)106 with copy_alembic_folder(dbname) as base_dir:107 # create the revision108 output = run_main(["alembic", dbname, "--directory", base_dir, "revision"],109 settings=settings)110 assert "Generating {}".format(base_dir) in output111def test_alembic_init():112 """ When we initialize a db, make sure that the ini exists """113 dbname = 'relengapi'114 settings = {'SQLALCHEMY_DATABASE_URIS': {}}115 for name in db._declarative_bases:116 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory117 run_main(["createdb"], settings=settings)118 with copy_alembic_folder(dbname, copy=False) as base_dir:119 run_main(["alembic", dbname, "--directory", base_dir, "init"], settings=settings)120 assert os.path.exists(os.path.join(base_dir, dbname, 'alembic.ini'))121def test_alembic_migrate():122 dbname = 'relengapi'123 settings = {'SQLALCHEMY_DATABASE_URIS': {}}124 for name in db._declarative_bases:125 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory126 run_main(["createdb"], settings=settings)127 with copy_alembic_folder(dbname) as base_dir:128 with mock.patch(129 "relengapi.blueprints.base.alembic_wrapper.AlembicMigrateSubcommand.migrate") as p:130 run_main(["alembic", dbname, "--directory", base_dir, "migrate"],131 settings=settings)132 assert p.called133def test_alembic_upgrade():134 dbname = 'relengapi'135 settings = {'SQLALCHEMY_DATABASE_URIS': {}}136 for name in db._declarative_bases:137 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory138 run_main(["createdb"], settings=settings)139 with copy_alembic_folder(dbname) as base_dir:140 with mock.patch(141 "relengapi.blueprints.base.alembic_wrapper.AlembicUpgradeSubcommand.upgrade") as p:142 run_main(["alembic", dbname, "--directory", base_dir, "upgrade"],143 settings=settings)144 assert p.called145def test_alembic_downgrade():146 dbname = 'relengapi'147 settings = {'SQLALCHEMY_DATABASE_URIS': {}}148 for name in db._declarative_bases:149 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory150 run_main(["createdb"], settings=settings)151 with copy_alembic_folder(dbname) as base_dir:152 with mock.patch(153 "relengapi.blueprints.base.alembic_wrapper."154 "AlembicDowngradeSubcommand.downgrade") as p:155 run_main(["alembic", dbname, "--directory", base_dir, "downgrade"],156 settings=settings)157 assert p.called158def test_alembic_stamp():159 dbname = 'relengapi'160 settings = {'SQLALCHEMY_DATABASE_URIS': {}}161 for name in db._declarative_bases:162 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory163 run_main(["createdb"], settings=settings)164 with copy_alembic_folder(dbname) as base_dir:165 with mock.patch(166 "relengapi.blueprints.base.alembic_wrapper.AlembicStampSubcommand.stamp") as p:167 run_main(["alembic", dbname, "--directory", base_dir, "stamp", "head"],168 settings=settings)169 assert p.called170def test_alembic_current():171 dbname = 'relengapi'172 settings = {'SQLALCHEMY_DATABASE_URIS': {}}173 for name in db._declarative_bases:174 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory175 run_main(["createdb"], settings=settings)176 with copy_alembic_folder(dbname) as base_dir:177 with mock.patch(178 "relengapi.blueprints.base.alembic_wrapper.AlembicCurrentSubcommand.current") as p:179 run_main(["alembic", dbname, "--directory", base_dir, "current"],180 settings=settings)181 assert p.called182def test_alembic_history():183 dbname = 'relengapi'184 settings = {'SQLALCHEMY_DATABASE_URIS': {}}185 for name in db._declarative_bases:186 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory187 run_main(["createdb"], settings=settings)188 with copy_alembic_folder(dbname) as base_dir:189 with mock.patch(190 "relengapi.blueprints.base.alembic_wrapper.AlembicHistorySubcommand.history") as p:191 run_main(["alembic", dbname, "--directory", base_dir, "history"],192 settings=settings)193 assert p.called194def test_alembic_show():195 dbname = 'relengapi'196 settings = {'SQLALCHEMY_DATABASE_URIS': {}}197 for name in db._declarative_bases:198 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory199 run_main(["createdb"], settings=settings)200 with copy_alembic_folder(dbname) as base_dir:201 with mock.patch(202 "relengapi.blueprints.base.alembic_wrapper.AlembicShowSubcommand.show") as p:203 run_main(["alembic", dbname, "--directory", base_dir, "show", "head"],204 settings=settings)205 assert p.called206def test_alembic_merge():207 dbname = 'relengapi'208 settings = {'SQLALCHEMY_DATABASE_URIS': {}}209 for name in db._declarative_bases:210 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory211 run_main(["createdb"], settings=settings)212 with copy_alembic_folder(dbname) as base_dir:213 with mock.patch(214 "relengapi.blueprints.base.alembic_wrapper.AlembicMergeSubcommand.merge") as p:215 run_main(["alembic", dbname, "--directory", base_dir, "merge", "head"],216 settings=settings)217 assert p.called218def test_alembic_heads():219 dbname = 'relengapi'220 settings = {'SQLALCHEMY_DATABASE_URIS': {}}221 for name in db._declarative_bases:222 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory223 run_main(["createdb"], settings=settings)224 with copy_alembic_folder(dbname) as base_dir:225 with mock.patch(226 "relengapi.blueprints.base.alembic_wrapper.AlembicHeadsSubcommand.heads") as p:227 run_main(["alembic", dbname, "--directory", base_dir, "heads"],228 settings=settings)229 assert p.called230def test_alembic_branches():231 dbname = 'relengapi'232 settings = {'SQLALCHEMY_DATABASE_URIS': {}}233 for name in db._declarative_bases:234 settings['SQLALCHEMY_DATABASE_URIS'][name] = 'sqlite:///' # in-memory235 run_main(["createdb"], settings=settings)236 with copy_alembic_folder(dbname) as base_dir:237 with mock.patch(238 "relengapi.blueprints.base.alembic_wrapper."239 "AlembicBranchesSubcommand.branches") as p:240 run_main(["alembic", dbname, "--directory", base_dir, "branches"],241 settings=settings)242 assert p.called...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!