def test_player_pause(): myplayer = VLCPlayer("player1 title", "player1 path", episode) myplayer._player = mock.MagicMock() myplayer.pause() myplayer._player.pause.assert_called_once() assert myplayer.state == 2
def test_player_vlc_pause(): myplayer = VLCPlayer("player1 title", "player1 path", episode) myplayer._player = mock.MagicMock() myplayer.pause() assert myplayer._player.pause.call_count == 1 assert myplayer.state == 2