Skip to content
Snippets Groups Projects
Commit 4c64a8da authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

TST: enhanced test for also testing updates

parent b6e488c6
No related branches found
No related tags found
1 merge request!53Release 0.1
......@@ -53,12 +53,12 @@ def main(args):
ident_adapt.register_identifiable(
"Person", db.RecordType()
.add_parent(name="Person")
.add_property(name="first_name")
#.add_property(name="first_name")
.add_property(name="last_name"))
ident_adapt.register_identifiable(
"Measurement", db.RecordType()
.add_parent(name="Measurement")
.add_property(name="identifier")
#.add_property(name="identifier")
.add_property(name="date")
.add_property(name="project"))
ident_adapt.register_identifiable(
......@@ -75,6 +75,15 @@ def main(args):
assert len(ins) == 18
assert len(ups) == 0
# Do a second run on the same data, there should be no changes:
crawler = Crawler(debug=True, identifiableAdapter=ident_adapt)
crawler.copy_attributes = Mock()
crawler.crawl_directory(rfp("../unittests/test_directories", "examples_article"),
rfp("../unittests/scifolder_cfood.yml"))
ins, ups = crawler.synchronize()
assert len(ins) == 0
assert len(ups) == 0
def parse_args():
parser = argparse.ArgumentParser(description=__doc__,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment