Commit 8f4d2b8d authored by libin's avatar libin
Browse files

修改角色添加sql

parent 2c363f9f
......@@ -14,11 +14,15 @@ from src.module import goto
class EditRole(unittest.TestCase):
def setUp(self):
deal_db_data.clear_park()
deal_db_data.clear_building()
deal_db_data.clear_floor()
deal_db_data.clear_area()
deal_db_data.clear_role()
insert_role = '''INSERT INTO `role`(domainId,menu,roleName,roleType,roleFlag,scopes,defaultRole,speReser)
VALUES({di},'{{"backMenu":"1","webMenu":"30,31,32,33,34"}}','VIP用户',0,3,'{{"scopes":[{{"scopeType":1,"tableIds":"3"}},{{"scopeType":2,"tableIds":"3"}},{{"scopeType":3,"tableIds":"2"}},{{"scopeType":4,"tableIds":"3"}},{{"scopeType":10,"tableIds":"{oi}"}}]}}',1,1),
({di},'{{"backMenu":"1","webMenu":"30,31,32,33,34"}}','VIP用户01',0,3,'{{"scopes":[{{"scopeType":1,"tableIds":"3"}},{{"scopeType":2,"tableIds":"3"}},{{"scopeType":3,"tableIds":"2"}},{{"scopeType":4,"tableIds":"3"}},{{"scopeType":10,"tableIds":"{oi}"}}]}}',1,1);''' \
.format(di=test_data.COMPANY_ID, oi=test_data.PRE_DEPARTMENT_ID)
VALUES({di},'{{"backMenu":"1","webMenu":"30,31,32,33,34"}}','VIP用户',0,3,'{{"scopes":[{{"scopeType":1,"tableIds":"{pi}"}},{{"scopeType":2,"tableIds":"{bi}"}},{{"scopeType":3,"tableIds":"{fi}"}},{{"scopeType":4,"tableIds":"{ai}"}},{{"scopeType":10,"tableIds":"{oi}"}}]}}',1,1),
({di},'{{"backMenu":"1","webMenu":"30,31,32,33,34"}}','VIP用户01',0,3,'{{"scopes":[{{"scopeType":1,"tableIds":"{pi}"}},{{"scopeType":2,"tableIds":"{bi}"}},{{"scopeType":3,"tableIds":"{fi}"}},{{"scopeType":4,"tableIds":"{ai}"}},{{"scopeType":10,"tableIds":"{oi}"}}]}}',1,1);''' \
.format(di=test_data.COMPANY_ID, oi=test_data.PRE_DEPARTMENT_ID,pi=test_data.PRE_PARK_ID,bi=test_data.PRE_BUILD_ID,fi=test_data.PRE_FLOOR_ID,ai=test_data.PRE_AREA_ID)
deal_db_data.execute_sql(insert_role)
self.browser = web_client.WebClient(test_data.MANAGE_URL)
login_swp.login01(self.browser, test_data.COMPANYADMIN_NAME, test_data.COMPANYADMIN_PW)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment