Skip to content
Snippets Groups Projects
Unverified Commit 35e40184 authored by Daniel's avatar Daniel
Browse files

TEST: Second test for caosdb-server#85

parent 7a626b67
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ def teardown():
# ########################### Issue tests start here ###########################
@with_setup(setup, teardown)
def test_issue_85():
def test_issue_85_a():
"""SQLIntegrityConstraintViolationException for special inheritance patterns.
Tests for https://gitlab.com/caosdb/caosdb-server/-/issues/85
......@@ -79,3 +79,24 @@ def test_issue_85():
c.extend([B, C, A]) # insert() failed before #86 was fixed
c.insert() # Raised java.sql.SQLIntegrityConstraintViolationException:
# # Duplicate entry '12345-12346-12345' for key 'PRIMARY'
@with_setup(setup, teardown)
def test_issue_85_b():
"""SQLIntegrityConstraintViolationException for special inheritance patterns.
Tests for https://gitlab.com/caosdb/caosdb-server/-/issues/85
"""
A = db.RecordType(name="A")
B = db.RecordType(name="B")
C = db.RecordType(name="C")
A.insert()
B.insert()
C.insert()
B.add_parent(A)
B.update()
C.add_parent(B)
C.update()
C.add_parent(C)
C.update()
C.add_parent(A)
C.update() # Failed at this step
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment