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

TST: records.xml is now generated by integration tests

parent 4c51170a
Branches
Tags
1 merge request!53Release 0.1
......@@ -112,6 +112,18 @@ def crawler_extended(ident):
def test_single_insertion(clear_database, usemodel, crawler):
ins, ups = crawler.synchronize()
# This test also generates the file records.xml used in some of the unittesets:
res = db.execute_query("FIND Record")
filename = rfp("..", "unittests", "records.xml")
with open(filename, "w") as f:
xml = res.to_xml()
# Remove noscript and transaction benchmark:
for tag in ("noscript", "TransactionBenchmark"):
if xml.find(tag) is not None:
xml.remove(xml.find(tag))
f.write(db.common.utils.xml2str(xml))
assert len(ins) == 18
assert len(ups) == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment