예제 #1
0
    def test_fetch_song_features__with_3_ids(self):
        lp = MLearnipy(username, auth=token())
        # creates a fake python object for further testing
        lp.user_playlist_tracks = MagicMock(return_value=playlist)
        lp.audio_features = MagicMock(return_value=mock_audio_features_any * 3)

        assert lp._fetch_song_features(([pl_1_song_id] * 3)) == mock_audio_features_any * 3
예제 #2
0
    def test_fetch_song_features__with_120_ids(self):
        lp = MLearnipy(username, auth=token())
        # creates a fake python object for further testing
        lp.audio_features = MagicMock(return_value=mock_audio_features_any * 60)

        assert lp._fetch_song_features(([pl_1_song_id] * 120)) == mock_audio_features_any * 120