Skip to content
Snippets Groups Projects

TEST: Test for server issue 217: faulty list property XML.

Merged Daniel Hornung requested to merge f-fix-description-change-w-list into dev
All threads resolved!
6 files
+ 34
15
Compare changes
  • Side-by-side
  • Inline
Files
6
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# ** header v3.0
# This file is a part of the CaosDB Project.
# This file is a part of the CaosDB Project.
#
#
# Copyright (c) 2020 IndiScale GmbH <info@indiscale.com>
# Copyright (c) 2022 IndiScale GmbH <info@indiscale.com>
# Copyright (c) 2020 Daniel Hornung <d.hornung@indiscale.com>
# Copyright (c) 2022 Daniel Hornung <d.hornung@indiscale.com>
# Copyright (c) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com>
# Copyright (c) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
@@ -19,8 +17,6 @@
@@ -19,8 +17,6 @@
#
#
# You should have received a copy of the GNU Affero General Public License
# 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/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
"""Tests for issues on gitlab.com, project caosdb-server."""
"""Tests for issues on gitlab.com, project caosdb-server."""
@@ -603,3 +599,17 @@ def test_issue_132():
@@ -603,3 +599,17 @@ def test_issue_132():
# this one has the wront scope of the conjunction.
# 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'"
query = "FIND RECORD TestRT WITH TestRT_Foo.TestP_Bar = val1 AND TestP_Baz = 'the other one'"
assert len(db.execute_query(query)) == 0
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.
Loading