Exemple #1
0
 def testCancelOrder(self):
     u'''取消订单'''
     cancelOrderUrl = "trade/cancelorder"
     orderParam = {"orderId": "20170109161326818370078801133568"}
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         cancelOrderUrl, orderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
Exemple #2
0
def ConfirmOrder():
    # print(CreateOrder())
    confirmOrderUrl = 'trade/confirmorder'
    confirmOrderParam = testOrderData.getConfirmOrderParam(CreateOrder())
    RESTFulClient = RESTFulClientPost.RESTFulClientPost(
        confirmOrderUrl, confirmOrderParam)
    return RESTFulClient.RESTFulClientPost()[0]
 def testConfirmOrder(self):
     u'''确认订单'''
     confirmOrderUrl = 'trade/confirmorder'
     confirmOrderParam = testOrderData.getConfirmOrderParam(
         self.testCreateOrder())
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         confirmOrderUrl, confirmOrderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
 def testCancelOrder(self):
     u'''取消订单'''
     cancelOrderUrl = "trade/cancelorder"
     orderParam = {"orderId": "%s" % (self.getOrderId())}
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         cancelOrderUrl, orderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
     return RESTFulClient.RESTFulClientPost()[1]
Exemple #5
0
 def testconfirmOrder(self):
     u'''确认订单'''
     confirmOrderUrl = 'trade/confirmorder'
     confirmOrderParam = {
         'seatDetail':
         "[{'seatCode':'78654908%2319%2311','priceId':120,'ticketMoney':8888,'serviceFee':300}]",
         'callbackUrl': 'callbackUrl',
         'orderId': '20170105170638816933918677663744'
     }
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         confirmOrderUrl, confirmOrderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
 def testrefundOrde(self):
     u'''退单'''
     refundOrderUrl = "trade/refundorder"
     refundOrderParam = {
         'orderId': self.getOrderId(),
         'callbackUrl': 'callbackUrl'
     }
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         refundOrderUrl, refundOrderParam)
     time.sleep(10)
     # print(RESTFulClient.RESTFulClientPost()[1])
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
 def testCreateOrder(self):
     u'''创建订单'''
     createOrderUrl = "trade/createorder"
     createOrderParam = {
         "cinemaCode": testData['cinemaCode'],
         "sessionId": testData["sessionId"],
         "mobile": "3J3fem93tBfyX2Y78XcGvQ==",
         "merchantOrderId": merchantOrderId,
         "seat": testData['seatCode']
     }
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         createOrderUrl, createOrderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
     return RESTFulClient.RESTFulClientPost()[1]
 def testCreateOrder(self):
     u'''创建订单'''
     createOrderUrl = "trade/createorder"
     # createOrderParam ={"cinemaCode":testData['cinemaCode'],"sessionId":testData["sessionId"],"mobile":"tDTFduWnXjCbcXVYGDuYjg==","merchantOrderId":merchantOrderId,"seat":testData['seatCode']}
     createOrderParam = {
         'cinemaCode': '78654908',
         'sessionId': '23798',
         'seat': "['78654908%2319%2311']",
         'mobile': '3J3fem93tBfyX2Y78XcGvQ==',
         'merchantOrderId': '2017010517574929'
     }
     RESTFulClient = RESTFulClientPost.RESTFulClientPost(
         createOrderUrl, createOrderParam)
     self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)
Exemple #9
0
def CreateOrder():
    createOrderUrl = "trade/createorder"
    createOrderParam = {
        "cinemaCode": testData['cinemaCode'],
        "sessionId": testData["sessionId"],
        "mobile": "3J3fem93tBfyX2Y78XcGvQ==",
        "merchantOrderId": merchantOrderId,
        "seat": testData['seatCode']
    }
    # print (createOrderParam)
    RESTFulClient = RESTFulClientPost.RESTFulClientPost(
        createOrderUrl, createOrderParam)
    # print (RESTFulClient.RESTFulClientPost()[1])
    return RESTFulClient.RESTFulClientPost()[1]
 def testrefundOrde(self): 
   u'''退单'''
   refundOrderUrl = "trade/refundorder"
   refundOrderParam = {'orderId':'20170106231710817389551696740352','callbackUrl':'callbackUrl'}
   RESTFulClient = RESTFulClientPost.RESTFulClientPost(refundOrderUrl,refundOrderParam)
   print(RESTFulClient.RESTFulClientPost()[0])
 def testQueryOrder(self): 
   u'''查询订单信息'''
   queryOrderUrl = "trade/queryorder"
   orderParam = {"orderId":"20161221110533811407228601896960"}
   RESTFulClient = RESTFulClientPost.RESTFulClientPost(queryOrderUrl,orderParam)
   self.assertTrue(RESTFulClient.RESTFulClientPost()[0] == 200)