Skip to content
Snippets Groups Projects
Commit e71281d3 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'dev' into f-real-rename-test-pylibsolo

parents 224c2527 0b0055d7
No related tags found
1 merge request!66DRAFT: pipeline for pylib rename
Pipeline #41441 passed
...@@ -1432,25 +1432,3 @@ See https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/106 ...@@ -1432,25 +1432,3 @@ See https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/106
# Existing Property should still be reported as TEXT # Existing Property should still be reported as TEXT
assert db.Record(id=r.id).retrieve().get_property("prop").datatype == db.TEXT assert db.Record(id=r.id).retrieve().get_property("prop").datatype == db.TEXT
@pytest.mark.xfail(reason="https://gitlab.com/caosdb/caosdb-server/-/issues/235")
def test_235_long_name():
"""Should give an appropriate error."""
length = 256
name = "N" * length
rt1 = db.RecordType(name=name)
try:
rt1.insert()
except Exception as exc:
assert type(Exception) is not db.HTTPServerError
# TODO more specific error should be asserted
rt2 = db.RecordType(name="Short")
rt2.insert()
rt2.name = name
try:
rt2.update()
except Exception as exc:
assert type(Exception) is not db.HTTPServerError
# TODO more specific error should be asserted
...@@ -31,7 +31,7 @@ def test_messages_dict_behavior(): ...@@ -31,7 +31,7 @@ def test_messages_dict_behavior():
from caosdb.common.models import Message, Messages from caosdb.common.models import Message, Messages
msgs = _Messages() msgs = Messages()
# create Message # create Message
msg = Message( msg = Message(
...@@ -40,10 +40,10 @@ def test_messages_dict_behavior(): ...@@ -40,10 +40,10 @@ def test_messages_dict_behavior():
description="Greeting the world", description="Greeting the world",
body="Hello, world!") body="Hello, world!")
# append it to the _Messages # append it to the Messages
msgs.append(msg) msgs.append(msg)
# use _Messages as list of Message objects # use Messages as list of Message objects
for m in msgs: for m in msgs:
assert isinstance(m, Message) assert isinstance(m, Message)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment