def test_set_user_management_roles(self): from kotti.security import USER_MANAGEMENT_ROLES from kotti.security import set_user_management_roles from kotti.security import reset_user_management_roles before = USER_MANAGEMENT_ROLES[:] set_user_management_roles(["role:admin"]) assert USER_MANAGEMENT_ROLES == ["role:admin"] reset_user_management_roles() assert USER_MANAGEMENT_ROLES == before
def test_set_user_management_roles(self): from kotti.security import USER_MANAGEMENT_ROLES from kotti.security import set_user_management_roles from kotti.security import reset_user_management_roles before = USER_MANAGEMENT_ROLES[:] set_user_management_roles(['role:admin']) assert USER_MANAGEMENT_ROLES == ['role:admin'] reset_user_management_roles() assert USER_MANAGEMENT_ROLES == before