def test_001_backstage_user_list(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户列表查询,查询所有
     """
     rs = PmsAction.test_backstage_user_list(name='', currentpage=1, pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
 def test_034_backstage_system_config_info_id_none(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 配置查询接口,id为空
     """
     rs = PmsAction.test_backstage_system_config_info(id='')
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
 def test_005_backstage_system_and_tenant_add(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 新增系统,新增机构,为机构管理员接口准备数据
     """
     sys_name = '系统'+fake.word() + loginAction.sign
     sys_host = 'test.'+MD.words_en_lower(3)+loginAction.sign + '78dk.com'
     sys_secret = loginAction.sign+MD.words_en_lower(7)
     sys_uuid = loginAction.sign+MD.words_en_lower(7)
     rs = PmsAction.test_backstage_system_add(businesssystemuuid=sys_uuid, host=sys_host, name=sys_name,
                                              secret=sys_secret)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
     business_id = pq.get_business_id('系统')
     PmsAction.test_backstage_tenant_add(name=tenant_name, systemid=business_id)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
 def test_001_backstage_tenant_config_tenant_list_all(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 机构管理员列表查询,查询所有机构
     """
     rs = PmsAction.test_backstage_tenant_config_tenant_list(name='', currentpage=1, pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
 def test_003_backstage_tenant_config_tenant_list_(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 机构管理员列表查询,查询已知机构
     """
     rs = PmsAction.test_backstage_tenant_config_tenant_list(name='消费分期', currentpage=1, pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], 'SUCCESS')
     Assertion.verityContain(json.loads(rs)['data']['objs'], '消费分期')
 def test_014_backstage_tenant_administrator_add_overlong(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理员新增,机构id超长
     """
     tenantid = MD.number(256)
     rs = PmsAction.test_backstage_tenant_administrator_add(phone=phone, name=administrator_name, email=email, tenantid=tenantid)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_019_backstage_tenant_administrator_info_not_exist(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理详情获取,不存在的id
     """
     tenant_adm_id = -1
     rs = PmsAction.test_backstage_tenant_administrator_info(id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_024_backstage_user_info_is_21(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 获取用户详情,id长度21位
     """
     user_id = MD.number(21)
     rs = PmsAction.test_backstage_user_info(id=user_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
 def test_019_backstage_user_add_all_is_null(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户新增,email、name均为空,新增失败
     """
     role_id = pq.get_role_id('超级管理员')
     rs = PmsAction.test_backstage_user_add(email='', roleid=role_id, realname='')
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
Beispiel #10
0
 def test_013_backstage_user_add_duplicate_email(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户新增,新增相同email,新增失败
     """
     role_id = pq.get_role_id('超级管理员')
     rs = PmsAction.test_backstage_user_add(email=email, roleid=role_id, realname=user_name)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
 def test_029_backstage_tenant_administrator_resert_password_overlong(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理员密码重置,id超长
     """
     tenant_adm_id = MD.number(256)
     rs = PmsAction.test_backstage_tenant_administrator_resert_password(id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_028_backstage_tenant_administrator_resert_password_not_exist(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理员密码重置,id不存在
     """
     tenant_adm_id = -1
     rs = PmsAction.test_backstage_tenant_administrator_resert_password(id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_027_backstage_tenant_administrator_resert_password(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理员密码重置
     """
     tenant_adm_id = pq.get_tenant_adm_id(business_name='系统',tenant_name='机构',adm_name='机构管理员')
     rs = PmsAction.test_backstage_tenant_administrator_resert_password(id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityContain(json.loads(rs)['msg'], '锁定')
 def test_026_backstage_tenant_administrator_change_overlong(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理状态管理,id超长
     """
     tenant_adm_id = MD.number(256)
     rs = PmsAction.test_backstage_tenant_administrator_change_state(changeto='enabled',id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_025_backstage_tenant_administrator_change_not_exist(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理状态管理,不存在的id
     """
     tenant_adm_id = -1
     rs = PmsAction.test_backstage_tenant_administrator_change_state(changeto='enabled',id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], 'SUCCESS')
 def test_024_backstage_tenant_administrator_change_state_unknown(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 机构管理状态管理,执为unknown
     """
     tenant_adm_id = pq.get_tenant_adm_id(business_name='系统',tenant_name='机构',adm_name='机构管理员')
     rs = PmsAction.test_backstage_tenant_administrator_change_state(changeto='unknown',id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityContain(json.loads(rs)['msg'], '错误')
 def test_006_backstage_tenant_administrator_list_no(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 未新增管理员,查询机构管理员
     """
     tenantid = pq.get_tenantid('系统', '机构')
     rs = PmsAction.test_backstage_tenant_administrator_list(tenantid=tenantid,currentpage=1,name='',pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
 def test_031_backstage_tenant_add(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 为“消费分期”系统新增机构,为机构管理员接口准备数据
     """
     business_id = pq.get_business_id('消费分期')
     rs = PmsAction.test_backstage_tenant_add(name=tenant_name, systemid=business_id)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
Beispiel #19
0
 def test_008_backstage_user_add(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户新增,正常新增
     """
     role_id = pq.get_role_id('超级管理员')
     rs = PmsAction.test_backstage_user_add(email=email, roleid=role_id, realname=user_name)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
 def test_032_backstage_tenant_administrator_add(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 新增管理员,为机构管理员接口准备数据
     """
     tenantid = pq.get_tenantid('消费分期', '机构')
     rs = PmsAction.test_backstage_tenant_administrator_add(phone=phone,name=administrator_name,email=email,tenantid=tenantid)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
Beispiel #21
0
 def test_018_backstage_user_add_role_is_null(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户新增,email为空,新增失败
     """
     email = fake.email()
     rs = PmsAction.test_backstage_user_add(email=email, roleid='', realname=user_name)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
Beispiel #22
0
 def test_027_backstage_user_change_state_from_enabled_to_disabled(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户状态管理,执为enabled后可以再次执为disabled
     """
     user_id = pq.get_user_id('test-API')
     rs = PmsAction.test_backstage_user_change_state(id=user_id, changeto='disabled')
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
Beispiel #23
0
 def test_021_backstage_user_info_not_exist(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 获取用户详情,id不存在
     """
     user_id = -1
     rs = PmsAction.test_backstage_user_info(id=user_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
Beispiel #24
0
 def test_002_backstage_user_list_one(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户列表查询,指定查询
     """
     rs = PmsAction.test_backstage_user_list(name='童超', currentpage=1, pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
     Assertion.verityContain(json.loads(rs)['data']['objs'], '童超')
 def test_034_backstage_tenant_administrator_edit_not_exist(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 编辑管理员,id不存在
     """
     tenant_adm_id = -1
     rs = PmsAction.test_backstage_tenant_administrator_edit(name='编辑'+administrator_name,email=email,phone=phone,id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
 def test_017_backstage_tenant_administrator_edit(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 编辑机构管理员,被锁定
     """
     tenant_adm_id = pq.get_tenant_adm_id(business_name='系统',tenant_name='机构',adm_name='机构管理员')
     rs = PmsAction.test_backstage_tenant_administrator_edit(name='编辑'+administrator_name, email=email, phone=phone,id= tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityContain(json.loads(rs)['msg'], '锁定')
Beispiel #27
0
 def test_028_backstage_user_change_state_to_unknown(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 用户状态管理,执为unknown
     """
     user_id = pq.get_user_id('test-API')
     rs = PmsAction.test_backstage_user_change_state(id=user_id, changeto='unknown')
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
 def test_035_backstage_tenant_administrator_edit_overlong(self):
     """
     Time       :2019-07-16
     author     : 闫红
     desc       : 编辑管理员,id超长
     """
     tenant_adm_id = MD.number(256)
     rs = PmsAction.test_backstage_tenant_administrator_edit(name='编辑'+administrator_name,email=email,phone=phone,id=tenant_adm_id)
     Assertion.verityNot(json.loads(rs)['code'], 10000)
     Assertion.verityNot(json.loads(rs)['msg'], "SUCCESS")
Beispiel #29
0
 def test_005_backstage_user_role_list(self):
     """
     Time       :2019-07-17
     author     : 闫红
     desc       : 获取角色列表
     """
     rs = PmsAction.test_backstage_user_role_list()
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], "SUCCESS")
     Assertion.verityContain(json.loads(rs)['data'], '超级管理员')
 def test_002_backstage_tenant_config_tenant_list_not_exist(self):
     """
     Time       :2019-07-15
     author     : 闫红
     desc       : 机构管理员列表查询,查询不存在的机构
     """
     rs = PmsAction.test_backstage_tenant_config_tenant_list(name='99999', currentpage=1, pagesize=10)
     Assertion.verity(json.loads(rs)['code'], 10000)
     Assertion.verity(json.loads(rs)['msg'], 'SUCCESS')
     Assertion.verityNone(json.loads(rs)['data']['objs'])