def test_005_refund_ticket(self):
		'''退票接口_ID_RefundTicket'''
		requestName = get_current_function_name()
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.refound_ticket(PrintNo, VerifyCode)
		res = client.service['NetSaleWebServicePort'].query(xml)
		
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage",res) + "PrintNo" + ':' + PrintNo + "VerifyCode" + ':' + VerifyCode)
		self.assertEqual(repxml.get_status(res), 'Success')
Example #2
0
	def test_002_plan_seat_xml(self):
		'''查询放映计划可用座位_ID_DQuerySessionSeat'''
		requestName = get_current_function_name()
		global SeatCode
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.plan_seat_xml(SessionPlanCode)
		res = client.service['NetSaleWebServicePort'].query(xml)
		
		self.assertEqual(repxml.get_status(res), 'Success')
		SeatCode = getAvilableSaleSeat(res)
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage", res) + "SeatCode" + ':' + SeatCode)
 def test_005_takeTicketConfirm(self):
     '''取票确认信息接口'''
     requestName = get_current_function_name()
     client = suds.client.Client(self.url)
     xml = OnlineTicketingServiceQuery_D.take_ticket_info(
         PrintNo, VerifyCode)
     res = client.service['NetSaleWebServicePort'].query(xml)
     logger.info(requestName + '--' +
                 repxml.get_keyOfValue("ErrorMessage", res))
     status = repxml.get_status(res)
     self.assertEqual(status, 'Success')
	def test_004_release_seat_seatCode(self):
		'''解锁座位_ID_SubmitOrder'''
		
		requestName = get_current_function_name()
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.release_seat(OrderCode,SessionPlanCode, '9900000100100301')
		res = client.service['NetSaleWebServicePort'].query(xml)
		print res
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage", res))
		self.assertEqual(repxml.get_status(res), 'Failure')
		self.assertIn( u'解锁和锁座不是同一个订单号,锁:1809171436220678',repxml.get_keyOfValue("ErrorMessage", res))
	def test_003_lock_seat_xml(self):
		'''锁定座位_ID_DLockSeat'''
		requestName = get_current_function_name()
		global OrderCode
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.lock_seat_xml(SessionPlanCode, SeatCode)
		res = client.service['NetSaleWebServicePort'].query(xml)
		OrderCode = repxml.get_keyOfValue("OrderCode", res)
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage", res) + "OrderCode" + ':' + OrderCode)
		self.assertEqual(repxml.get_status(res), 'Success')
		self.assertEqual(repxml.get_keyOfValue("ErrorMessage", res), 'NULL')
	def test_001_search_show_plan(self):
		'''查询放映计划_ID_DQuerySession'''
		global SessionPlanCode
		requestName = get_current_function_name()
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.film_plan_xml()
		res = client.service['NetSaleWebServicePort'].query(xml)

		self.assertEqual(repxml.get_status(res), 'Success')
		SessionPlanCode = repxml.get_value("Code", res)[0]
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage", res) + "SessionPlanCode" + ':' + SessionPlanCode)
Example #7
0
 def test_001_sync_channel_lsit(self):
     '''同步排期_ID_SyncChannelList'''
     global SessionPlanCode
     requestName = get_current_function_name()
     client = suds.client.Client(self.url)
     xml = OnlineTicketingServiceQuery_D.sync_channel_list()
     res = client.service['NetSaleWebServicePort'].query(xml)
     print res
     status = repxml.get_status(res)
     self.assertEqual(status, 'Success')
     logger.info(requestName + '--' +
                 repxml.get_keyOfValue("ErrorMessage", res))
	def test_004_confirmSCTS_order(self):
		'''确认SCTS订单交易接口_ID_SubmitOrder'''
		global PrintNo, VerifyCode
		requestName = get_current_function_name()
		client = suds.client.Client(self.url)
		xml = OnlineTicketingServiceQuery_D.order_sure_xml(OrderCode, SessionPlanCode, SeatCode, '50', '40', '10', '3')
		res = client.service['NetSaleWebServicePort'].query(xml)
		
		PrintNo = repxml.get_keyOfValue("PrintNo", res)
		VerifyCode = repxml.get_keyOfValue("VerifyCode", res)
		logger.info(requestName + '--' + repxml.get_keyOfValue("ErrorMessage", res))
		self.assertEqual(repxml.get_status(res), 'Success')
    def test_004_confirmSCTS_order(self):
        '''解锁座位_ID_SubmitOrder'''

        requestName = get_current_function_name()
        client = suds.client.Client(self.url)
        xml = OnlineTicketingServiceQuery_D.release_seat(
            OrderCode, SessionPlanCode, SeatCode)
        res = client.service['NetSaleWebServicePort'].query(xml)

        logger.info(requestName + '--' +
                    repxml.get_keyOfValue("ErrorMessage", res))
        self.assertEqual(repxml.get_status(res), 'Success')
        self.assertEqual(repxml.get_keyOfValue("ErrorMessage", res), 'NULL')
Example #10
0
    def test_004_release_seat_seatCode(self):
        '''解锁座位_ID_SubmitOrder_错误的排期编码'''

        requestName = get_current_function_name()
        client = suds.client.Client(self.url)
        xml = OnlineTicketingServiceQuery_D.release_seat(
            OrderCode, '5518091700102106', SeatCode)
        res = client.service['NetSaleWebServicePort'].query(xml)

        logger.info(requestName + '--' +
                    repxml.get_keyOfValue("ErrorMessage", res))
        self.assertEqual(repxml.get_status(res), 'Failure')
        self.assertIn(repxml.get_keyOfValue("ErrorMessage", res), u'无效的放映计划编码')
    def test_005_refund_ticket(self):
        '''退票接口_ID_RefundTicket'''
        requestName = get_current_function_name()
        client = suds.client.Client(self.url)
        xml = OnlineTicketingServiceQuery_D.refound_ticket(PrintNo, VerifyCode)
        res = client.service['NetSaleWebServicePort'].query(xml)
        logger.info(requestName + '--' +
                    repxml.get_keyOfValue("ErrorMessage", res) + "PrintNo" +
                    ':' + PrintNo + "VerifyCode" + ':' + VerifyCode)
        status = repxml.get_status(res)
        self.assertEqual(status, 'Success')

    # def test_006_refundRecordTicketInfo(self):
    # 	'''记录信息'''
    # 	currentTime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    # 	with open('rufundTicketInfo.txt', 'a') as text:
    # 		text.write('%s=%s' % ('testcaseTime', currentTime))
    # 		text.write('%s=%s' % ('SessionPlanCode', SessionPlanCode))
    # 		text.write('%s=%s' % ('SeatCode', SeatCode))
    # 		text.write('%s=%s' % ('OrderCode', OrderCode))
    # 		text.write('%s=%s' % ('PrintNo', PrintNo))
    # 		text.write('%s=%s' % ('VerifyCode', VerifyCode))
    # 		text.write("\n")