diff --git a/tests/test_issues_server.py b/tests/test_issues_server.py index 51e9327f274786c48c2cb80ee73fbde1a3f0841e..6419573d22e583e400eccad626bc8d4b143f92d1 100644 --- a/tests/test_issues_server.py +++ b/tests/test_issues_server.py @@ -1139,23 +1139,25 @@ def test_135(): def test_192(): """Testing queries with Property by name. -See https://gitlab.com/caosdb/caosdb-server/-/issues/192 + See https://gitlab.com/caosdb/caosdb-server/-/issues/192 -COUNT Record WHICH HAS price -> Results: 19 -COUNT Record WHICH HAS Property price -> Results: 19 -COUNT Record WITH price -> Results: 19 -COUNT Record WITH Property price -> Results: 0 -""" + COUNT Record WHICH HAS price -> Results: 19 + COUNT Record WHICH HAS Property price -> Results: 19 + COUNT Record WITH price -> Results: 19 + COUNT Record WITH Property price -> Results: 0 + """ db.Property(name="testprop", datatype=db.DOUBLE).insert() db.RecordType(name="TestRT").add_property("testprop").insert() db.Record(name="Rec1").add_parent("TestRT").add_property("testprop", value=3.1).insert() - query1 = "COUNT Record WHICH HAS testprop" - query2 = "COUNT Record WHICH HAS Property testprop" - query3 = "COUNT Record WITH testprop" - query4 = "COUNT Record WITH A testprop" - query5 = "COUNT Record WITH Property testprop" - query6 = "COUNT Record WITH A Property testprop" + query1 = "COUNT RECORD WHICH HAS testprop" + query2 = "COUNT RECORD WHICH HAS A testprop" + query3 = "COUNT RECORD WHICH HAS Property testprop" + query4 = "COUNT RECORD WHICH HAS A Property testprop" + query5 = "COUNT RECORD WITH testprop" + query6 = "COUNT RECORD WITH A testprop" + query7 = "COUNT RECORD WITH Property testprop" + query8 = "COUNT RECORD WITH A Property testprop" count1 = db.execute_query(query1) count2 = db.execute_query(query2) @@ -1163,6 +1165,8 @@ COUNT Record WITH Property price -> Results: 0 count4 = db.execute_query(query4) count5 = db.execute_query(query5) count6 = db.execute_query(query6) + count7 = db.execute_query(query7) + count8 = db.execute_query(query8) assert count1 == 1 assert count2 == 1 @@ -1170,3 +1174,5 @@ COUNT Record WITH Property price -> Results: 0 assert count4 == 1 assert count5 == 1 assert count6 == 1 + assert count7 == 1 + assert count8 == 1