2020-06-19 10:13:52 +02:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
import core.config
|
|
|
|
import modules.contrib.mpd
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def mpd_module():
|
|
|
|
return modules.contrib.mpd.Module(config=core.config.Config([]), theme=None)
|
|
|
|
|
|
|
|
def test_shuffle_off_by_default(mpd_module):
|
|
|
|
assert not mpd_module._shuffle
|
2020-06-19 11:00:56 +02:00
|
|
|
|
|
|
|
def test_shuffle_state(mocker, mpd_module):
|
|
|
|
widget = mocker.Mock()
|
|
|
|
widget.name = 'mpd.shuffle'
|
|
|
|
assert mpd_module.state(widget) == 'shuffle-off'
|