diff --git a/tests/test_issues_server.py b/tests/test_issues_server.py index 2f13c732201315c243a32019939738f04ee1c95a..a26d53a7eddbc6363fbc26fe0193a12e26671f1d 100644 --- a/tests/test_issues_server.py +++ b/tests/test_issues_server.py @@ -1355,3 +1355,22 @@ def test_216(): cont.insert() assert db.execute_query("FIND RECORDTYPE B", unique=True).name == "B" + + +@pytest.mark.xfail(reason="Needs fix for non-integer ids in queries, " + "see https://gitlab.com/caosdb/caosdb-server/-/issues/138") +def test_138(): + """Problems with non-integer ids in query filters, see + https://gitlab.com/caosdb/caosdb-server/-/issues/138 + + """ + + queries = [ + "FIND ENTITY WITH ID={}", + "FIND ENTITY WITH ID=None", + "FIND ENTITY WITH ID=\"1 non-existing id\"" + ] + for query in queries: + # No error, but of course also no results. + results = db.execute_query(query) + assert len(results) == 0