示例#1
0
 def test_1_oneDragon(self):
     # -------------------------首页信息查询(带token和userNo)------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.APPL_SUMMARY_QUERY
     paramIn = Gatlin.packApplSummaryQueryParam()
     paramIn['userNo'] = self.context['userNo']  # 取上下文的userNo,下同
     paramIn['token'] = self.context['token']
     Gatlin.printParam(json.dumps(paramIn))
     self.ret = json.loads(Gatlin.myJsonPost(urlStr, paramIn).text)
示例#2
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_6_registerOnly(self):
     # -------------------------手机号注册,返回token------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.REGISTER
     res = myJsonPost(urlStr, packRegisterParam())
     self.ret = res.text
     retJson = json.loads(self.ret)
     token = retJson['data']['token']
     print("Fetch Register Token", token)
示例#3
0
 def test_2_oneDragon(self):
     # -------------------------首页信息查询(带token和userNo)------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.REFUND_RECORD_QUERY
     paramIn = packRefundRecordQueryParam()
     paramIn['userNo'] = self.context['userNo']  # 取上下文的userNo,下同
     paramIn['token'] = self.context['token']
     Gatlin.printParam(paramIn)
     self.ret = json.loads(Gatlin.myJsonPost(urlStr, paramIn).text)
示例#4
0
文件: base.py 项目: kokomal/GATLIN
 def call_out(self):
     GLOBAL_ENV = self.context['environ']
     if "mock" in GLOBAL_ENV and GLOBAL_ENV["mock"]:  # mock开关打开
         return
     ENV = self.context['environ']['env']
     METHOD = self.context['environ']['nodeName']
     url_str = consts.getEnviron(ENV) + consts.getMethod(METHOD)
     res = Gatlin.myJsonPost(url_str, self.context['request'])
     self.context['response'] = json.loads(res.text)
示例#5
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_8_oneDragon(self):
     # -------------------------一条龙------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.LOGIN
     res = myJsonPost(urlStr, packLoginParam())
     self.ret = res.text
     printReturn(self.ret)
     retJson = json.loads(self.ret)
     token = retJson['data']['token']  # 更新token
     userNo = retJson['data']['userNo']  # 获得userNo
     self.context['token'] = token  # 放入上下文
     self.context['userNo'] = userNo
     # -------------------------首页信息查询(带token和userNo)------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.APPL_SUMMARY_QUERY
     param = packApplSummaryQueryParam()
     param['userNo'] = self.context['userNo']  # 取上下文的token,下同
     param['token'] = self.context['token']
     res = myJsonPost(urlStr, param)
     self.ret = res.text
示例#6
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_7_loginOnly(self):
     # -------------------------手机号登录,返回token------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.LOGIN
     res = myJsonPost(urlStr, packLoginParam())
     self.ret = res.text
     retJson = json.loads(self.ret)
     token = retJson['data']['token']
     self.context['token'] = token  # token放入上下文
     print("Fetch LOGIN Token", token)
示例#7
0
 def test_3_oneDragon(self):
     # -------------------------补件信息查询(带token和userNo)------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.SUPPLEMENT_LIST_QUERY
     paramIn = packSupplementlistQWueryParam()
     paramIn['userNo'] = self.context['userNo']  # 取上下文的userNo,下同
     paramIn['token'] = self.context['token']
     paramIn['custNo'] = self.context['custNo']
     Gatlin.printParam(paramIn)
     self.ret = json.loads(Gatlin.myJsonPost(urlStr, paramIn).text)
示例#8
0
文件: frame.py 项目: kokomal/GATLIN
 def myInit(self):
     print('STARTING...')
     self.ENV = self.paramIn['environ']
     security.init(self.ENV)  # 初始化加密的公私钥
     self.context = {}  # 初始化上下文
     loginPrepare = packLoginParam(self.paramIn)
     urlStr = consts.getEnviron(self.ENV) + consts.LOGIN
     res = Gatlin.myJsonPost(urlStr, loginPrepare)
     retJson = json.loads(res.text)
     token = retJson['data']['token']
     userNo = retJson['data']['userNo']  # 获得userNo
     print("Fetch LOGIN Token", token)
     self.context['token'] = token  # token放入上下文
     self.context['userNo'] = userNo  # userNo放入上下文
     self.curMethod = "biz1"
示例#9
0
文件: frame.py 项目: kokomal/GATLIN
 def myInit(self):
     print('STARTING...')
     self.ENV = self.paramIn['env']
     security.init(self.ENV)  # 初始化加密的公私钥
     self.context = {}  # 初始化上下文
     regPrepare = packRegisterParam(self.paramIn)
     print(regPrepare)
     urlStr = consts.getEnviron(self.ENV) + consts.REGISTER
     res = Gatlin.myJsonPost(urlStr, regPrepare)
     retJson = json.loads(res.text)
     print(retJson)
     token = retJson['data']['token']
     userNo = retJson['data']['userNo']  # 获得userNo
     print("Fetch REGISTER Token", token)
     self.context['token'] = token  # token放入上下文
     self.context['userNo'] = userNo  # userNo放入上下文
     self.curMethod = "biz4"
示例#10
0
 def setUpClass(self):
     print('STARTING...')
     self.ENV = "PH_DEV"  # ~~~~~~~~~~~~~~~~~~~~~~这里改环境!!!~~~~~~~~~~~~~~~~~~~~~~
     security.init(self.ENV)  # 初始化加密的公私钥
     self.context = {}  # 初始化上下文
     loginPrepare = packLoginParam(
         '+6308062400111',
         b'123456')  # ~~~~~~~~~~~~~~~~~~~~~~这里改用户!!!~~~~~~~~~~~~~~~~~~~~~~
     urlStr = consts.getEnviron(self.ENV) + consts.LOGIN
     res = Gatlin.myJsonPost(urlStr, loginPrepare)
     retJson = json.loads(res.text)
     Gatlin.get_pretty_print(retJson)
     token = retJson['data']['token']
     userNo = retJson['data']['userNo']  # 获得userNo
     mobileNo = retJson['data']['mobileNo']  # 获得mobileNo
     custNo = retJson['data']['custNo']  # 获得mobileNo
     print("Fetch LOGIN Token", token)
     self.context['token'] = token  # token放入上下文
     self.context['userNo'] = userNo  # userNo放入上下文
     self.context['mobileNo'] = mobileNo  # userNo放入上下文
     self.context['custNo'] = custNo  # userNo放入上下文
示例#11
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_5_applSummaryQuery(self):
     # -------------------------首页信息查询------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.APPL_SUMMARY_QUERY
     res = myJsonPost(urlStr, packApplSummaryQueryParam())
     self.ret = res.text
示例#12
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_4_webSendSms(self):
     # -------------------------WEB发送验证码----------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.MCMSG_QUERY
     res = myJsonPost(urlStr, packSmsSendParam())
     self.ret = res.text
示例#13
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_3_mcMsgQuery(self):
     # -------------------------消息中心列表查询---------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.MCMSG_QUERY
     res = myJsonPost(urlStr, packMcMsgQueryParam())
     self.ret = res.text
示例#14
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_2_mcMsgCount(self):
     # -------------------------消息中心消息数-----------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.MCMSG_COUNTNEW
     res = myJsonPost(urlStr, packMcMsgCountNewParam())
     self.ret = res.text
示例#15
0
文件: Gatlin.py 项目: kokomal/GATLIN
 def test_1_preQuery(self):
     # -------------------------登录前预校验------------------------------
     urlStr = consts.getEnviron(self.ENV) + consts.PREQUERY
     res = myJsonPost(urlStr, packPreQueryParam())
     self.ret = res.text
示例#16
0
文件: frame.py 项目: kokomal/GATLIN
 def refundRecordQuery(self):
     refundPrepare = packRefundRecordQueryParam(self.paramIn)
     urlStr = consts.getEnviron(self.ENV) + consts.REFUND_RECORD_QUERY
     self.ret = Gatlin.myJsonPost(urlStr, refundPrepare).text