import unittest
from blueprints.settings import testConfig
from blueprints.requestResult import requestResult
from blueprints.tools.asertcase import asertcase
from blueprints.tools.dealCasefile import readCaseFile
class maintest(unittest.TestCase):
   def __init__(self, methodName='runTest', config=None):
       super(maintest, self).__init__(methodName)
       self.config = config
   @staticmethod
   def parametrize(testcase_klass, config=None):
       testloader = unittest.TestLoader()
       testnames = testloader.getTestCaseNames(testcase_klass) 
       suite = unittest.TestSuite()
       for name in testnames:
           print('name====',name)
           suite.addTest(testcase_klass(name, config=config))
       return suite

class passportapi0(maintest):
   def test_100(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_101(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_102(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_103(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)

class payment1(maintest):
   def test_100(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_101(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_102(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/608.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/608.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_103(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/609.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/609.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_104(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/610.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/610.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_105(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_106(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_107(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/716.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/716.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_108(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/743.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/743.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_109(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/744.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/744.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_110(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/762.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/762.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_111(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/763.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/763.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_112(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/764.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/764.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_113(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/819.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/819.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_114(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/834.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/834.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_115(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/831.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/831.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_116(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/833.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/833.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)
   def test_117(self):
       res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json')
       res,finalresult=res1.requestJson()
       t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json').get('result')
       r=0 if 0 in finalresult and len(finalresult)>0 else 1
       if r:
           self.detail=res1.keyoption()+('Success',)
       else:
           if isinstance(res,dict):
               self.detail=res1.keyoption()+(res.__str__(),)
           elif len(res.text)>5000 :
               self.detail=res1.keyoption()+('响应数据过长',)
           else:
               self.detail=res1.keyoption()+(res.text,)
       if r==0:
           msg='断言失败，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(1, 0,msg=msg)
       else :
           msg='断言成功，预期结果：'+str(t)+',实际结果查看响应数据'
           self.assertEqual(0, 0,msg=msg)

