diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py index cb5ed2c769945af033bc56a2d6af3bf1cec86de4..2bf12084d244ddf91c5d5ef3d693f76da6649ec8 100644 --- a/integrationtests/test_realworld_example.py +++ b/integrationtests/test_realworld_example.py @@ -38,6 +38,8 @@ import pytest from caosadvancedtools.models.parser import parse_model_from_json_schema, parse_model_from_yaml from caosadvancedtools.loadFiles import loadpath +from caoscrawler.scanner import load_definition, scan_structure_elements, create_converter_registry + import sys set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2") @@ -169,10 +171,10 @@ def test_event_update(clear_database, usemodel, addfiles): ident.load_from_yaml_definition(identifiable_path) second_crawler = Crawler(identifiableAdapter=ident) - crawler_definition = second_crawler.load_definition( + crawler_definition = load_definition( crawler_definition_path) - converter_registry = second_crawler.load_converters(crawler_definition) - records = second_crawler.start_crawling( + converter_registry = create_converter_registry(crawler_definition) + records, debug_tree = scan_structure_elements( Directory("data", os.path.join(DATADIR, "data")), crawler_definition, converter_registry @@ -190,7 +192,7 @@ def test_event_update(clear_database, usemodel, addfiles): "latitude").value = 0.0 rec.get_property("Event").value[0].get_property( "location").value = "Origin" - second_crawler.synchronize() + second_crawler.synchronize(records) # Dataset is still the same Record, but with an updated event new_dataset_rec = db.Record(id=old_dataset_rec.id).retrieve()