diff --git a/unittests/test_scanner.py b/unittests/test_scanner.py
index 19bdd46dce20b300a897e765a765584c82ca6aca..1a1c8c1823aee5e84d35b9ddaf7dc919b56e40dc 100644
--- a/unittests/test_scanner.py
+++ b/unittests/test_scanner.py
@@ -264,6 +264,9 @@ def test_variable_deletion_problems():
     records = scan_directory(UNITTESTDIR / "test_directories" / "example_variable_deletion",
                              UNITTESTDIR / "cfood_variable_deletion2.yml")
 
+    # For the following test the order of records is actually important:
+    assert records[0].name == "Record from Data_1"
+    assert records[1].name == "Record from Data_2"
     for record in records:
         if record.name == "Record from Data_1":
             assert record.get_property("var1").value == "bla"