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')
Пример #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)
Пример #7
0
    def test_005_query_order_info(self):
        '''查询订单信息_ID_DQueryOrder'''
        requestName = get_current_function_name()
        client = suds.client.Client(self.url)
        xml = OnlineTicketingServiceQuery_D.query_order_info(OrderCode)
        res = client.service['NetSaleWebServicePort'].query(xml)

        logger.info(requestName + '--' +
                    repxml.get_keyOfValue("ErrorMessage", res))
        status = repxml.get_status(res)
        self.assertEqual(status, 'Success')
Пример #8
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')
Пример #10
0
 def test_006_query_take_ticket_info(self):
     '''查询取票信息接口_ID_DQueryTakeTicketInfo'''
     requestName = get_current_function_name()
     client = suds.client.Client(self.url)
     xml = OnlineTicketingServiceQuery_D.query_take_ticket_info(
         PrintNo, VerifyCode)
     #TicketStatus	影票状态	String	Y	影票状态0:未退票/1:已退票
     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_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')
Пример #12
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_002_query_ticket_type(self):
     '''查询票价类型_ID_QueryTicketTyp'''
     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)
     print res
     status = repxml.get_status(res)
     self.assertEqual(status, 'Success')
     SessionPlanCode = repxml.get_value("Code", res)[0]
     logger.info(requestName + '--' +
                 repxml.get_keyOfValue("ErrorMessage", res) +
                 "SessionPlanCode" + ':' + SessionPlanCode)
    def test_005_query_order_info(self):
        '''查询订单信息_ID_DQueryOrder'''
        requestName = get_current_function_name()
        client = suds.client.Client(self.url)
        xml = OnlineTicketingServiceQuery_D.query_order_info(
            '9999211551430054')
        res = client.service['NetSaleWebServicePort'].query(xml)
        print res

        logger.info(requestName + '--' +
                    repxml.get_keyOfValue("ErrorMessage", res))
        status = repxml.get_status(res)
        self.assertEqual(status, 'Failure')
        self.assertIn(u'该订单不存在', repxml.get_keyOfValue("ErrorMessage", res))
 def test_001_search_show_plan(self):
     '''获取影片信息_ID_DQueryFilm'''
     #说明:查询电影院在一段时期中上映的影片信息,测试得来的结果还必须是当天有排期,如果没排期,依然不显示,有拷贝也不行
     requestName = get_current_function_name()
     url = url_query()
     client = suds.client.Client(url)
     xml = OnlineTicketingServiceQuery_D.film_info_xml()
     res = client.service['NetSaleWebServicePort'].query(xml)
     print res
     status = repxml.get_status(res)
     self.assertEqual(status, 'Success')
     SessionPlanCode = repxml.get_value("Code", res)[0]
     logger.info(requestName + '--' +
                 repxml.get_keyOfValue("ErrorMessage", res) +
                 "SessionPlanCode" + ':' + SessionPlanCode)
Пример #16
0
    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")