diff --git a/tests/test_webservice.py b/tests/test_webservice.py
index c713cbf8be2e01062f153045fab293fc53a331f9..ff368afe247b878a0e61cafac1c746beae829848 100644
--- a/tests/test_webservice.py
+++ b/tests/test_webservice.py
@@ -75,5 +75,5 @@ async def test_wait_on_transfer(tmp_path):
         content="""#!{}\nprint('user.status="dCache"')""".format(sys.executable)
     )
     with mock_getfattr:
-        res = await wait_on_transfer(tmp_path, max_tries=1)
+        res = await wait_on_transfer(str(tmp_path), max_tries=1)
     assert res is True