Skip to content
Snippets Groups Projects
Commit 7b5662ab authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files
parent 54fcd481
Branches
Tags
No related merge requests found
Pipeline #51953 passed
...@@ -1507,6 +1507,22 @@ def test_253(): ...@@ -1507,6 +1507,22 @@ def test_253():
assert len(results) == 0 assert len(results) == 0
@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
error but an unqulified properties error, see
https://gitlab.com/linkahead/linkahead-server/-/issues/260.
"""
prop = db.Property(name="TestDateTimeProp", datatype=db.DATETIME).insert()
rt = db.RecordType(name="TestType").add_property(prop).insert()
with pytest.raises(TransactionError) as te:
rec = db.Record().add_parent(rt).add_property(name=prop.name, value="11:00")
rec.insert()
assert te.value.has_error(db.UnqualifiedPropertiesError)
assert "Cannot parse value to datetime format" in te.value.msg
@pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/263") @pytest.mark.xfail(reason="https://gitlab.com/linkahead/linkahead-server/-/issues/263")
def test_263(): def test_263():
with pytest.raises(TransactionError) as exc: with pytest.raises(TransactionError) as exc:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment