예제 #1
0
def test_player_play():
    myplayer = VLCPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer.play()
    myplayer._player.play.assert_called_once()
    assert myplayer.state == 1
예제 #2
0
def test_player_vlc_play():
    myplayer = VLCPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer.play()
    assert myplayer._player.play.call_count == 1
    assert myplayer.state == 1