diff --git a/plugin/archivar/tests/test_presence_engine.py b/plugin/archivar/tests/test_presence_engine.py index d93614a..fcdfb02 100644 --- a/plugin/archivar/tests/test_presence_engine.py +++ b/plugin/archivar/tests/test_presence_engine.py @@ -545,9 +545,17 @@ class TestSetstatusTogglesPresence: assert not engine.is_enabled() + # P2 FB-05: PulseController exists but is NOT running before enable + assert engine._pulse_controller is not None + assert not engine._pulse_controller.is_running() + engine.enable() assert engine.is_enabled() + # P2 FB-05: After enable(), PulseController still not running + # (start() is called externally by _cmd_setstatus after bind_ddp/bind_rest) + assert not engine._pulse_controller.is_running() + # Jetzt sollte _set_presence funktionieren engine._set_presence("online", "") engine._flush_presence() @@ -566,9 +574,16 @@ class TestSetstatusTogglesPresence: assert engine.is_enabled() + # P2 FB-05: Start PulseController to verify stop() is called on disable + engine._pulse_controller.start() + assert engine._pulse_controller.is_running() + engine.disable() assert not engine.is_enabled() + # P2 FB-05: After disable(), PulseController must be stopped + assert not engine._pulse_controller.is_running() + # Jetzt sollte _set_presence nichts tun engine._set_presence("online", "") engine._flush_presence()