Exemplo n.º 1
0
 def test_027_api_78dk_platform_sys_privilege_saveUserPrivilege(self):
     """
     新增/修改权限
     :return:
     """
     platform_privilege_uuid0 = xqkj_query.get_info(
         'Tbl_PlatformPrivilege', 'platform_privilege_uuid', 'name="渠道管理"',
         'state ="enabled"')[0]
     platform_privilege_uuid1 = xqkj_query.get_info(
         'Tbl_PlatformPrivilege', 'platform_privilege_uuid', 'name="渠道列表"',
         'state ="enabled"')[0]
     platform_user_profile_uuid = xqkj_query.get_info(
         'Tbl_PlatformUserProfile', 'platform_user_profile_uuid',
         'name="{}"'.format(name), 'state ="enabled"')[0]
     platform_privilege_uuid = [{
         "platformPrivilegeUuid":
         platform_privilege_uuid0,
         "platformUserUuid":
         platform_user_profile_uuid
     }, {
         "platformPrivilegeUuid":
         platform_privilege_uuid1,
         "platformUserUuid":
         platform_user_profile_uuid
     }]
     res = specialAction.test_api_78dk_platform_sys_privilege_saveUserPrivilege(
         platform_privilege_uuid)
     Assertion.verity(json.loads(res)['code'], '10000')
     Assertion.verity(json.loads(res)['msg'], '成功')
 def test_01_api_78dk_platform_tm_first_viewFirstCheckContract(self):
     global contract_uuid
     contract_uuid = xqkj_query.get_contract_uuid()
     # 初审信息查询
     merchant_uuid, product_name, contract_number, early_repayment_support = \
         xqkj_query.get_info('Tbl_Contract',
                             'merchant_uuid,product_name,contract_number,early_repayment_support',
                             'contract_uuid="{}"'.format(contract_uuid))
     # 查询商户名称
     merchant_name = xqkj_query.get_info(
         'Tbl_MerchantProfile', 'name',
         'merchant_uuid="{}"'.format(merchant_uuid))[0]
     res = PlatformAction.test_api_78dk_platform_tm_first_viewFirstCheckContract(
         contract_uuid)
     # 法大大地址
     contract_uuidurl = xqkj_query.get_info(
         'Tbl_ContractInfo', 'view_url',
         'contract_uuid="{}"'.format(contract_uuid))[0]
     Assertion.verity(json.loads(res)['msg'], '成功')
     Assertion.verity(json.loads(res)['code'], '10000')
     Assertion.verity(json.loads(res)['data']['fddUrl'], contract_uuidurl)
     Assertion.verity(
         json.loads(res)['data']['earlyRepaymentSupport'],
         early_repayment_support)
     Assertion.verity(
         json.loads(res)['data']['merchantName'], merchant_name)
     Assertion.verity(
         json.loads(res)['data']['contractNumber'], contract_number)
     Assertion.verity(json.loads(res)['data']['productName'], product_name)
Exemplo n.º 3
0
 def test_001_api_78dk_app_process_savePersonInfo(self):
     """
     保存基本信息
     :return:
     """
     user_uuid = loginAction.global_dict.get('user_uuid')
     global datum_type_education_id, datum_type_housing_id, datum_type_marry_id, live_city, live_city_name
     global live_detail, live_province, live_province_name, live_region, live_region_name, contactlist
     datum_type_education_id, datum_type_housing_id, datum_type_marry_id, live_city, live_city_name, live_detail, \
     live_province, live_province_name, live_region, live_region_name = xqkj_query.get_info(
         'Tbl_UserPersonalInfo',
         'datum_type_education_id,datum_type_housing_id,datum_type_marry_id,live_city,live_city_name,'
         'live_detail,live_province,live_province_name,live_region,live_region_name',
         'user_uuid="{}"'.format(user_uuid))
     contactlist = [{
         "datumTypeContactId": i + 1,
         "name": fake.name(),
         "phone": fake.phone_number()
     } for i in range(contact_num)]
     res = json.loads(
         AppAction.test_api_78dk_app_process_savePersonInfo(
             contactlist=contactlist,
             datumtypeeducationid=datum_type_education_id,
             datumtypehousingid=datum_type_housing_id,
             datumtypemarryid=datum_type_marry_id,
             livecity=live_city,
             livecityname=live_city_name,
             livedetail=live_detail,
             liveprovince=live_province,
             email=email,
             iswork=1,
             liveprovincename=live_province_name,
             liveregion=live_region,
             liveregionname=live_region_name))
     Assertion.verity(res['code'], '20000')
 def test_001_api_78dk_app_process_saveWorkInfo(self):
     """
     保存工作信息
     :return:
     """
     user_uuid = loginAction.global_dict.get('user_uuid')
     global company_city, company_city_name, company_detail, company_name, company_province, company_province_name
     global company_region, company_region_name, datum_type_income_id, position, work_phone
     company_city, company_city_name, company_detail, company_name, company_province, company_province_name, \
     company_region, company_region_name, datum_type_income_id, position, work_phone = \
         xqkj_query.get_info(
             'Tbl_UserWorkInfo',
             'company_city,company_city_name,company_detail,company_name,company_province,'
             'company_province_name,company_region,company_region_name,datum_type_income_id,position,work_phone',
             'user_uuid="{}"'.format(user_uuid))
     res = json.loads(
         AppAction.test_api_78dk_app_process_saveWorkInfo(
             companycity=company_city,
             companycityname=company_city_name,
             companydetail=company_detail,
             companyname=company_name,
             companyprovince=company_province,
             companyprovincename=company_province_name,
             companyregion=company_region,
             companyregionname=company_region_name,
             datumtypeincomeid=datum_type_income_id,
             position=position,
             workphone=work_phone,
             propertiesid='74',
             scaleid='81',
             datumtypeworktimeid=91))
     Assertion.verity(res['code'], '10000')
Exemplo n.º 5
0
 def test_051_api_78dk_platform_mm_base_store_updateStore(self):
     # 修改门店
     global store_uuid
     sql = 'manager_name="' + store_name + '" and state ="enabled"'
     store_uuid = xqkj_query.get_info('Tbl_Store', 'store_uuid', sql)[0]
     global_dict.set(
         store_uuid=xqkj_query.get_info('Tbl_Store', 'store_uuid', sql)[0])
     res = PlatformAction.test_api_78dk_platform_mm_base_store_updateStore(
         businessaddress='经营地址',
         businessaddressgpsloction='GPS地址',
         managername=store_name,
         managerphone='18911390729',
         merchantuuid=merchant_uuid,
         storeuuid=store_uuid,
         province=510000,
         city=510100,
         region=510104,
         provincename='',
         cityname='',
         regionname='',
         storename='storeNamebbbbbbbbb')
     Assertion.verity(json.loads(res)['code'], '10000')
     Assertion.verity(json.loads(res)['msg'], '成功')
Exemplo n.º 6
0
 def test_026_api_78dk_platform_sys_privilege_saveUserPrivilege_all_privilege(
         self):
     # 新增/修改权限
     privilege_uuids = xqkj_query.get_tbl_infos('Tbl_PlatformPrivilege',
                                                'platform_privilege_uuid',
                                                'state ="enabled"')
     user_uuid = xqkj_query.get_info('Tbl_PlatformUserProfile',
                                     'platform_user_profile_uuid',
                                     'name="{}"'.format(name),
                                     'state ="enabled"')[0]
     privilege = [{
         "platformPrivilegeUuid": uid,
         "platformUserUuid": user_uuid
     } for uid in privilege_uuids]
     res = specialAction.test_api_78dk_platform_sys_privilege_saveUserPrivilege(
         privilege)
     Assertion.verity(json.loads(res)['code'], '10000')
     Assertion.verity(json.loads(res)['msg'], '成功')