Added mpd module tests for update and layout

This commit is contained in:
Ambika Nair 2020-06-19 06:35:15 -04:00
parent 52f5315ec5
commit 6271a0b91d

View file

@ -30,3 +30,11 @@ def test_bad_layout():
def test_hidden_on_creation(mpd_module): def test_hidden_on_creation(mpd_module):
assert mpd_module.hidden() assert mpd_module.hidden()
def test_update_calls_load_song(mocker, mpd_module):
mocker.patch.object(mpd_module, '_load_song')
mpd_module.update()
mpd_module._load_song.assert_called_once()
def test_default_layout(mpd_module):
assert mpd_module._layout == "mpd.prev mpd.main mpd.next mpd.shuffle mpd.repeat"