<s> from __future__ import absolute_import , unicode_literals <EOL> import unittest <EOL> import mock <EOL> from mopidy . core import CoreListener , PlaybackState <EOL> from mopidy . models import Playlist , TlTrack <EOL> class CoreListenerTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . listener = CoreListener ( ) <EOL> def test_on_event_forwards_to_specific_handler ( self ) : <EOL> self . listener . track_playback_paused = mock . Mock ( ) <EOL> self . listener . on_event ( <EOL> '<STR_LIT>' , track = TlTrack ( ) , position = <NUM_LIT:0> ) <EOL> self . listener . track_playback_paused . assert_called_with ( <EOL> track = TlTrack ( ) , position = <NUM_LIT:0> ) <EOL> def test_listener_has_default_impl_for_track_playback_paused ( self ) : <EOL> self . listener . track_playback_paused ( TlTrack ( ) , <NUM_LIT:0> ) <EOL> def test_listener_has_default_impl_for_track_playback_resumed ( self ) : <EOL> self . listener . track_playback_resumed ( TlTrack ( ) , <NUM_LIT:0> ) <EOL> def test_listener_has_default_impl_for_track_playback_started ( self ) : <EOL> self . listener . track_playback_started ( TlTrack ( ) ) <EOL> def test_listener_has_default_impl_for_track_playback_ended ( self ) : <EOL> self . listener . track_playback_ended ( TlTrack ( ) , <NUM_LIT:0> ) <EOL> def test_listener_has_default_impl_for_playback_state_changed ( self ) : <EOL> self . listener . playback_state_changed ( <EOL> PlaybackState . STOPPED , PlaybackState . PLAYING ) <EOL> def test_listener_has_default_impl_for_tracklist_changed ( self ) : <EOL> self . listener . tracklist_changed ( ) <EOL> def test_listener_has_default_impl_for_playlists_loaded ( self ) : <EOL> self . listener . playlists_loaded ( ) <EOL> def test_listener_has_default_impl_for_playlist_changed ( self ) : <EOL> self . listener . playlist_changed ( Playlist ( ) ) <EOL> def test_listener_has_default_impl_for_playlist_deleted ( self ) : <EOL> self . listener . playlist_deleted ( Playlist ( ) ) <EOL> def test_listener_has_default_impl_for_options_changed ( self ) : <EOL> self . listener . options_changed ( ) <EOL> def test_listener_has_default_impl_for_volume_changed ( self ) : <EOL> self . listener . volume_changed ( <NUM_LIT> ) <EOL> def test_listener_has_default_impl_for_mute_changed ( self ) : <EOL> self . listener . mute_changed ( True ) <EOL> def test_listener_has_default_impl_for_seeked ( self ) : <EOL> self . listener . seeked ( <NUM_LIT:0> ) <EOL> def test_listener_has_default_impl_for_stream_title_changed ( self ) : <EOL> self . listener . stream_title_changed ( '<STR_LIT>' ) </s>
