From a44a3acf03b4c6bbad1a5c46d9488050dba45f8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Sun, 16 Oct 2022 11:49:07 +0200
Subject: [PATCH] DOC: more comments

---
 unittests/test_tool.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/unittests/test_tool.py b/unittests/test_tool.py
index 33ccc230..50dcb4b2 100755
--- a/unittests/test_tool.py
+++ b/unittests/test_tool.py
@@ -287,7 +287,6 @@ def test_crawler_update_list(crawler, ident):
 
 def test_synchronization(crawler, ident):
     insl, updl = crawler.synchronize(commit_changes=False)
-
     assert len(insl) == 0
     assert len(updl) == 0
 
@@ -513,17 +512,23 @@ def test_all_references_are_existing_already2(crawler):
     crawler.identifiableAdapter.get_registered_identifiable = Mock(side_effect=partial(
         basic_ident_lookup, idents=registered_identifiables))
 
+    # no reference to check
+    assert crawler.all_references_are_existing_already(db.Record().add_parent("C"))
+    # one reference with id
     assert crawler.all_references_are_existing_already(
         db.Record().add_parent("C").add_property('a', 123))
-    assert crawler.all_references_are_existing_already(db.Record().add_parent("C"))
+    # one ref with id one with Entity with id
     assert crawler.all_references_are_existing_already(db.Record().add_parent("D")
                                                        .add_property('a', 123)
                                                        .add_property('b', db.Record(id=123)))
     a = db.Record(name="A").add_parent("C").add_property("a", 12311)
+    # one ref with id one with Entity without id
     assert not crawler.all_references_are_existing_already(db.Record().add_parent("D")
                                                            .add_property('a', 123)
                                                            .add_property('b', a))
     crawler.add_identified_record_to_local_cache(a)
+    # one ref with id one with Entity which is cached
+    # (RT C has a as identifying prop which is given in this example)
     assert crawler.all_references_are_existing_already(db.Record().add_parent("D")
                                                        .add_property('a', 123)
                                                        .add_property('b', a))
-- 
GitLab