diff --git a/unittests/test_error_handling.py b/unittests/test_error_handling.py
index 3223ff252be26b89ee9542cd73132caef87e202c..c3fbd8bed90c75303b270a5f8074b2908472a4e0 100644
--- a/unittests/test_error_handling.py
+++ b/unittests/test_error_handling.py
@@ -30,7 +30,7 @@ import caosdb as db
 from caosdb.common.models import raise_errors
 # TODO: Import the relevant error classes once they have been finalized.
 from caosdb.exceptions import (AmbiguityException,
-                               AuthorizationException, ContainerError,
+                               AuthorizationException,
                                EntityDoesNotExistError, EntityError,
                                EntityHasNoDatatypeError,
                                TransactionError, UniqueNamesError,
@@ -271,17 +271,14 @@ def test_container_with_faulty_elements():
     with raises(TransactionError) as e:
         raise_errors(cont)
     te = e.value
-    # only container on first level:
-    assert len(te.errors) == 1
-    ce = te.errors[0]
-    assert isinstance(ce, ContainerError)
+    assert te.get_container() == cont
     # no healthy entity caused an error
     for good in [good_rec, good_prop]:
         assert not good in te.all_entities
     # all records that caused problems
     assert {rec_name, rec_auth, rec_par_prop}.issubset(te.all_entities)
     # the container error contains the errors caused by the records
-    for err in ce.errors:
+    for err in te.errors:
         if err.entity.name == rec_name.name:
             assert isinstance(err, UniqueNamesError)
         elif err.entity.name == rec_auth.name: