Skip to content
Snippets Groups Projects
Verified Commit e4c6cc19 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

TEST: test_issues_server.py::test_258_name_too_long

Current behavior: Unexpected server error when name is too long.
parent b76520f9
Branches
Tags caosdb-pylib-v0.15.0
No related merge requests found
Pipeline #56752 passed
......@@ -30,7 +30,11 @@ import linkahead as db
import pytest
from linkahead import administration as admin
from linkahead.exceptions import (TransactionError, HTTPClientError, HTTPURITooLongError)
from linkahead.exceptions import (
TransactionError,
HTTPClientError,
HTTPURITooLongError,
)
CURATOR_ROLE = "curator"
......@@ -1508,6 +1512,25 @@ def test_253():
assert len(results) == 0
@pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/258")
def test_258_name_too_long():
"""Unexpected server error when name is too long."""
test_name_short = [
"0123456789",
"0123456789" * 25,
]
test_name_long = [
"0123456789" * 26,
]
for name in test_name_short:
ent = db.RecordType(name=name).insert()
assert ent.id > 0
for name in test_name_long:
with pytest.raises(TransactionError) as tre:
db.RecordType(name=name).insert()
assert "too long" in str(tre.value)
@pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/260")
def test_260_datetime_without_date():
"""Only time value in datetime property must not cause an unexpected server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment