Add test for play_stop for #6

remotes/origin/HEAD
Phil Howard 2020-07-15 11:50:51 +01:00
parent 9cb6b7a4e6
commit 1c8da1b576
1 changed files with 17 additions and 0 deletions

View File

@ -66,6 +66,23 @@ def test_frontend_handler_dispatch_play_pause():
stop_mopidy_core()
def test_frontend_handler_dispatch_play_stop():
sys.modules["RPi"] = mock.Mock()
sys.modules["RPi.GPIO"] = mock.Mock()
frontend = frontend_lib.RaspberryGPIOFrontend(
dummy_config, dummy_mopidy_core()
)
ext = Extension()
schema = ext.get_config_schema()
settings = schema["bcm1"].deserialize("play_stop,active_low,30")
frontend.dispatch_input(settings)
stop_mopidy_core()
def test_frontend_handler_dispatch_next():
sys.modules["RPi"] = mock.Mock()
sys.modules["RPi.GPIO"] = mock.Mock()