diff --git a/pystencils_tests/test_datahandling_parallel.py b/pystencils_tests/test_datahandling_parallel.py
index b1c416fed40e53d0a31c87e371608f06e670671b..dd18e4fb18a78ad96d3685e4400799852e2fa9d9 100644
--- a/pystencils_tests/test_datahandling_parallel.py
+++ b/pystencils_tests/test_datahandling_parallel.py
@@ -4,7 +4,6 @@ import waLBerla as wlb
 import pystencils
 from pystencils import make_slice
 
-from tempfile import TemporaryDirectory
 from pathlib import Path
 
 from pystencils.boundaries import BoundaryHandling, Neumann
@@ -138,11 +137,14 @@ def test_parallel_datahandling_boundary_conditions():
                               default_target=pystencils.Target.GPU)
 
     src = dh.add_array('src', values_per_cell=1)
-    dh.fill("src", 0.0, ghost_layers=True)
-    dh.fill("src", 1.0, ghost_layers=False)
+    dh.fill(src.name, 0.0, ghost_layers=True)
+    dh.fill(src.name, 1.0, ghost_layers=False)
+
+    src2 = dh.add_array('src2', values_per_cell=1)
+
     src_cpu = dh.add_array('src_cpu', values_per_cell=1, gpu=False)
-    dh.fill("src_cpu", 0.0, ghost_layers=True)
-    dh.fill("src_cpu", 1.0, ghost_layers=False)
+    dh.fill(src_cpu.name, 0.0, ghost_layers=True)
+    dh.fill(src_cpu.name, 1.0, ghost_layers=False)
 
     boundary_stencil = [(1, 0), (-1, 0), (0, 1), (0, -1)]
     boundary_handling_cpu = BoundaryHandling(dh, src_cpu.name, boundary_stencil,
@@ -165,10 +167,10 @@ def test_parallel_datahandling_boundary_conditions():
     boundary_handling()
     dh.all_to_cpu()
     for block in dh.iterate():
-        np.testing.assert_almost_equal(block["src_cpu"], block["src"])
+        np.testing.assert_almost_equal(block[src_cpu.name], block[src.name])
 
     assert dh.custom_data_names == ('boundary_handling_cpuIndexArrays', 'boundary_handling_gpuIndexArrays')
-    dh.swap("src", "src2", gpu=True)
+    dh.swap(src.name, src2.name, gpu=True)
 
 
 def test_save_data():