diff --git a/unittests/test_tool.py b/unittests/test_tool.py index e924a9d63f84d7ff54a6acabf6819480ac74417f..33ccc230a29697c238ac988bca00ec1e940e88b9 100755 --- a/unittests/test_tool.py +++ b/unittests/test_tool.py @@ -284,15 +284,11 @@ def test_crawler_update_list(crawler, ident): assert len(comp[0]["properties"]) == 0 assert len(comp[1]["properties"]) == 0 - insl, updl = crawler.split_into_inserts_and_updates(crawler.updateList) + +def test_synchronization(crawler, ident): + insl, updl = crawler.synchronize(commit_changes=False) assert len(insl) == 0 - assert len(updl) == 18 - identified_records = [crawler.identifiableAdapter.retrieve_identifiable(record) for record - in updl] - for el in updl: - crawler.replace_entities_by_ids(el) - Crawler.remove_unnecessary_updates(updl, identified_records) assert len(updl) == 0