def test_set_and_get_read_access(): # type: () -> None user_acl = acl.ACL() user_acl.set_read_access("520", True) assert user_acl.permissions_by_id["520"]["read"] assert user_acl.get_read_access("520") user_acl = acl.ACL() test_user = user.User() test_user.id = "520" user_acl.set_read_access(test_user, True) assert user_acl.get_read_access(test_user) role_acl = acl.ACL() test_role = role.Role("520", role_acl) role_acl.set_read_access(test_role, True) assert role_acl.get_read_access(test_role)
def test_set_and_get_read_access(): user_acl = acl.ACL() user_acl.set_read_access(520, True) assert user_acl.permissions_by_id[520]['read'] assert user_acl.get_read_access(520) user_acl = acl.ACL() test_user = user.User() test_user.id = 520 user_acl.set_read_access(test_user, True) assert user_acl.get_read_access(test_user) role_acl = acl.ACL() test_role = role.Role('520', role_acl) role_acl.set_read_access(test_role, True) assert role_acl.get_read_access(test_role)
def test_set_and_get_read_access(): # type: () -> None user_acl = acl.ACL() user_acl.set_read_access('520', True) assert user_acl.permissions_by_id['520']['read'] assert user_acl.get_read_access('520') user_acl = acl.ACL() test_user = user.User() test_user.id = '520' user_acl.set_read_access(test_user, True) assert user_acl.get_read_access(test_user) role_acl = acl.ACL() test_role = role.Role('520', role_acl) role_acl.set_read_access(test_role, True) assert role_acl.get_read_access(test_role)
def test_set_and_get_role_write_access(): # type: () -> None role_acl = acl.ACL() test_role = role.Role("520", role_acl) role_acl.set_role_write_access(test_role, True) assert role_acl.permissions_by_id["role:520"]["write"] assert role_acl.get_role_write_access(test_role)
def test_set_and_get_role_write_access(): role_acl = acl.ACL() test_role = role.Role('520', role_acl) role_acl.set_role_write_access(test_role, True) assert role_acl.permissions_by_id['role:520']['write'] assert role_acl.get_role_write_access(test_role)
def test_set_and_get_role_read_access(): # type: () -> None role_acl = acl.ACL() test_role = role.Role('520', role_acl) role_acl.set_role_read_access(test_role, True) assert role_acl.permissions_by_id['role:520']['read'] assert role_acl.get_role_read_access(test_role)