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

TST: add test for server issue 248

parent 6b757c01
No related branches found
No related tags found
No related merge requests found
Pipeline #47633 passed with warnings
# -*- coding: utf-8 -*-
# This file is a part of the CaosDB Project.
#
# Copyright (c) 2020 - 2022 IndiScale GmbH <info@indiscale.com>
# Copyright (c) 2020 - 2024 IndiScale GmbH <info@indiscale.com>
# Copyright (c) 2022 Daniel Hornung <d.hornung@indiscale.com>
# Copyright (c) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com>
# Copyright (c) 2021 - 2022 Timm Fitschen <t.fitschen@indiscale.com>
# Copyright (c) 2021 - 2024 Timm Fitschen <t.fitschen@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
......@@ -19,18 +19,18 @@
# 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/>.
"""Tests for issues on gitlab.com, project caosdb-server."""
"""Tests for issues on gitlab.com, project linkahead-server."""
import math
import os
import tempfile
import time
import caosdb as db
import linkahead as db
import pytest
from caosdb import administration as admin
from caosdb.exceptions import (TransactionError, HTTPClientError, HTTPURITooLongError)
from linkahead import administration as admin
from linkahead.exceptions import (TransactionError, HTTPClientError, HTTPURITooLongError)
CURATOR_ROLE = "curator"
......@@ -1482,3 +1482,12 @@ def test_235_long_name():
except Exception as exc:
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."""
rt = db.RecordType(name="RT1").insert()
prop = db.Property(name="prop", datatype=db.DOUBLE).insert()
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment