From d3280bfd52a8ea13fb78dbea719218b31d142d6c Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Tue, 20 Feb 2024 13:37:32 +0100 Subject: [PATCH] TEST: Test for server issue #253 Value in string queries may not start with large number of digits. --- tests/test_issues_server.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_issues_server.py b/tests/test_issues_server.py index 13b3056..8bedd02 100644 --- a/tests/test_issues_server.py +++ b/tests/test_issues_server.py @@ -1483,6 +1483,7 @@ def test_235_long_name(): assert not isinstance(exc, db.HTTPServerError) # TODO more specific error should be asserted + @pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/248") def test_248(): """Querying for entities with property fails if using ID.""" @@ -1491,3 +1492,16 @@ def test_248(): rec = db.Record().add_parent(rt).add_property(prop, value=23).insert() results = db.execute_query(f"FIND Entity with {prop.id}") assert len(results) == 1 + + +@pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/253") +def test_253(): + """Value in string queries may not start with large number of digits.""" + test_strings = [ + "0123456789", + "hello" + "0123456789" * 5 + "world", + "0123456789" * 5 + "world", + ] + for string in test_strings: + results = db.execute_query(f"FIND Entity with prop={string}") + assert len(results) == 0 -- GitLab