diff --git a/tests/test_issues_server.py b/tests/test_issues_server.py index 844de461a3665240cf9d053d0cb8f7439767efe6..ba2f31a3f5c2885c5eee10cedfb11be982d9ad50 100644 --- a/tests/test_issues_server.py +++ b/tests/test_issues_server.py @@ -1,10 +1,8 @@ # -*- coding: utf-8 -*- -# -# ** header v3.0 # This file is a part of the CaosDB Project. # -# Copyright (c) 2020 IndiScale GmbH <info@indiscale.com> -# Copyright (c) 2020 Daniel Hornung <d.hornung@indiscale.com> +# Copyright (c) 2022 IndiScale GmbH <info@indiscale.com> +# Copyright (c) 2022 Daniel Hornung <d.hornung@indiscale.com> # Copyright (c) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com> # # This program is free software: you can redistribute it and/or modify @@ -19,8 +17,6 @@ # # 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 """Tests for issues on gitlab.com, project caosdb-server.""" @@ -603,3 +599,17 @@ def test_issue_132(): # this one has the wront scope of the conjunction. query = "FIND RECORD TestRT WITH TestRT_Foo.TestP_Bar = val1 AND TestP_Baz = 'the other one'" assert len(db.execute_query(query)) == 0 + + +def test_issue_217(): + """Server gets list property datatype wrong if description is updated.""" + + rt = db.RecordType(name="TestRT").insert() + # prop = db.Property(name="LP", datatype=db.LIST("TestRT")).insert() + r = db.Record().add_parent(id=rt.id).add_property(name=rt.name, + datatype=db.LIST(db.INTEGER), + value=[1, 2]).insert() + r.retrieve() + r.description = "Changed description" + r.update() + r.retrieve() # This line fails in the bug report with invalid XML.