diff --git a/tests/test_state.py b/tests/test_state.py index 07fbfd8ee8e6cf0dcfb986fa25992d123b5c548b..0b2c510d5c78609e9f9797336687446a7b20e2d6 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -1,3 +1,25 @@ +# encoding: utf-8 +# +# This file is a part of the CaosDB Project. +# +# Copyright (C) 2020-2022 IndiScale GmbH <info@indiscale.com> +# Copyright (C) 2020-2022 Timm Fitschen <t.fitschen@indiscale.com> +# +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU Affero General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License along +# with this program. If not, see <https://www.gnu.org/licenses/>. +# +# ** end header +# import pytest import caosdb as db from caosdb import administration as admin @@ -489,8 +511,10 @@ def test_transfer_state_acl(): state_acl = state_acl.combine(db.get_global_acl()) # the acl has been transfered from the state record - assert insert_rec.acl.get_permissions_for_role("role1") == {"UPDATE:DESCRIPTION"} - assert "RETRIEVE:ENTITY" not in insert_rec.acl.get_permissions_for_role("anonymous") + assert insert_rec.acl.get_permissions_for_role("role1") == { + "UPDATE:DESCRIPTION"} + assert "RETRIEVE:ENTITY" not in insert_rec.acl.get_permissions_for_role( + "anonymous") assert insert_rec.acl == state_acl @@ -817,6 +841,7 @@ def test_transitions_included_after_empty_update(): def test_missing_retrieve_permission(): """When the retrieve permission is missing, the state must not be leaked.""" + # @review Florian Spreckelsen 2022-03-22 rec = db.Record() rec.description = "old description" rec.add_parent("TestRT")