diff --git a/integrationtests/test.py b/integrationtests/test.py
index 57bc674a79af1d1ff11cecca6a6a7c6ba66ec1bc..0b4afe53f9a288ce4a2c46aba3645d483e56305d 100755
--- a/integrationtests/test.py
+++ b/integrationtests/test.py
@@ -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