Skip to content
Snippets Groups Projects
Verified Commit 9b42e9a5 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

STY: autopep8'ed test_issues_server.py

parent f080f121
No related branches found
No related tags found
1 merge request!12TST: add tests for caosdb-server#170
Pipeline #12844 passed
......@@ -262,41 +262,39 @@ def test_issue_131():
def test_issue_170():
"""update scalar data type to list data type"""
p = db.Property(name="TestProp1", datatype=db.LIST(db.INTEGER))
p.value = [1,2]
p.insert() # works
p.value = [1, 2]
p.insert() # works
p2 = db.execute_query("FIND TestProp1", unique=True)
assert p2.datatype == db.LIST(db.INTEGER)
assert p2.value == [1,2]
assert p2.value == [1, 2]
p.description = "TestDescription"
p.update() # fails
p.update() # fails
p2 = db.execute_query("FIND TestProp1", unique=True)
assert p2.datatype == db.LIST(db.INTEGER)
assert p2.value == [1,2]
assert p2.value == [1, 2]
assert p2.description == "TestDescription"
p = db.Property(name="TestProp2", datatype=db.DOUBLE)
p.insert() # works
p.insert() # works
p.datatype = db.LIST(db.INTEGER)
p.update() # works
p.update() # works
p2 = db.execute_query("FIND TestProp1", unique=True)
assert p2.datatype == db.LIST(db.INTEGER)
assert p2.value == [1,2]
assert p2.value == [1, 2]
p2.value = [1, 2]
p2.update() # fails
p2.update() # fails
p = db.Property(name="TestProp3", datatype=db.DOUBLE)
p.insert() # works
p.insert() # works
p.datatype = db.LIST(db.INTEGER)
p.value = [1, 2]
p.update() # fails
p.update() # fails
p2 = db.execute_query("FIND TestProp1", unique=True)
assert p2.datatype == db.LIST(db.INTEGER)
assert p2.value == [1,2]
assert p2.value == [1, 2]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment