def test_set_roles(self): from kotti.security import ROLES from kotti.security import set_roles from kotti.security import reset_roles before = ROLES.copy() set_roles({"role:admin": ROLES["role:admin"]}) assert ROLES == {"role:admin": ROLES["role:admin"]} reset_roles() assert ROLES == before
def test_set_roles(self): from kotti.security import ROLES from kotti.security import set_roles from kotti.security import reset_roles before = ROLES.copy() set_roles({'role:admin': ROLES['role:admin']}) assert ROLES == {'role:admin': ROLES['role:admin']} reset_roles() assert ROLES == before