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

TEST: Test for mysql-backend issue 21

parent 7018a317
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,8 @@
import caosdb as db
from nose.tools import with_setup
def setup_module():
try:
......@@ -66,3 +68,25 @@ def test_issue_18():
C1 = db.Entity(name="C").retrieve()
pids = [p.id for p in C1.parents]
assert len(set(pids)) == len(pids), "Duplicate parents."
@with_setup(setup, teardown)
def test_issue_21():
"""Removing the last child in an inheritance chain of 4 failed with versioning.
Tests for https://gitlab.com/caosdb/caosdb-mysqlbackend/-/issues/21
"""
A = db.RecordType(name="A")
B = db.RecordType(name="B")
C = db.RecordType(name="C")
rec = db.RecordType(name="rec")
A.add_parent(B)
B.add_parent(C)
rec.add_parent(A)
cont = db.Container()
cont.extend([A, B, C, rec])
cont.insert()
rec.delete()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment