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_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")
def test_020_backstage_user_info(self): """ Time :2019-07-17 author : 闫红 desc : 获取用户详情 """ user_id = pq.get_user_id('test-API') rs = PmsAction.test_backstage_user_info(id=user_id) Assertion.verity(json.loads(rs)['code'], 10000) Assertion.verity(json.loads(rs)['msg'], "SUCCESS") Assertion.verityContain(json.loads(rs)['data'], 'test-API')
def test_011_backstage_user_edit(self): """ Time :2019-07-17 author : 闫红 desc : 编辑用户 """ role_id = pq.get_role_id('超级管理员') id = pq.get_user_id('用户test-API') rs=PmsAction.test_backstage_user_edit(id=id, roleid=role_id, realname='编辑'+loginAction.sign, email=email) Assertion.verity(json.loads(rs)['code'], 10000) Assertion.verity(json.loads(rs)['msg'], "SUCCESS")