diff --git a/tests/test_base_device.py b/tests/test_base_device.py
index 6ea95ef67af5ae712fa6947f23855c061c5995ad..c98de2672f3e26ad81ab312659a5a3361eadb48c 100644
--- a/tests/test_base_device.py
+++ b/tests/test_base_device.py
@@ -618,21 +618,22 @@ class TestSKABaseDevice(object):
             s.connect(("localhost", _DEBUGGER_PORT))
         assert tango_context.device.state
 
+    @pytest.mark.usefixtures("patch_debugger_to_start_on_ephemeral_port")
     def test_DebugDevice_twice_does_not_raise(self, tango_context):
-        patch_debugger_to_start_on_ephermal_port()
         tango_context.device.DebugDevice()
         tango_context.device.DebugDevice()
         assert SKABaseDevice._global_debugger_listening
 
+    @pytest.mark.usefixtures("patch_debugger_to_start_on_ephemeral_port")
     def test_DebugDevice_does_not_break_a_command(self, tango_context):
-        patch_debugger_to_start_on_ephermal_port()
         tango_context.device.DebugDevice()
         assert tango_context.device.State() == DevState.OFF
         tango_context.device.On()
         assert tango_context.device.State() == DevState.ON
 
 
-def patch_debugger_to_start_on_ephermal_port():
+@pytest.fixture()
+def patch_debugger_to_start_on_ephemeral_port():
     ska_tango_base.base.base_device._DEBUGGER_PORT = 0