Esempio n. 1
0
    def test_playing_when_spotify_error(self,
                                        print_mock,
                                        gorrion_mock):
        gorrion_mock.return_value.playing.side_effect = SpotifyApiError(
            'spotify error'
        )

        cli = CLI()
        cli.playing(True)

        print_mock.assert_called()
Esempio n. 2
0
    def test_playing(self, print_mock, gorrion_mock):
        gorrion_mock.return_value.playing.return_value = PublishedTweet(
            '123',
            'song',
            None
        )

        cli = CLI()
        cli.playing(True)

        print_mock.assert_any_call('[---------------------- Song -----------------------]')
        print_mock.assert_any_call('song')