def test_player_stop(): myplayer = MPVPlayer("player1 title", "player1 path", episode) myplayer._player = mock.MagicMock() myplayer.stop() myplayer._player.shutdown.assert_called_once() assert myplayer.state == 0
def test_player_mpv_stop(): myplayer = MPVPlayer("player1 title", "player1 path", episode) myplayer._player = mock.MagicMock() myplayer.stop() assert myplayer.state == 0