From ceaa03046867246015c4800d1952036155a492ab Mon Sep 17 00:00:00 2001 From: Paul Lamere Date: Thu, 19 Jun 2014 14:41:52 -0400 Subject: [PATCH] Fixed album search test --- CHANGES.txt | 3 ++- examples/artist_discography.py | 1 - setup.py | 4 ++-- spotipy/__init__.py | 2 +- spotipy/oauth2.py | 2 +- tests/tests.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 97a016c..b8f82d0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,2 +1,3 @@ -v, -- Initial release. +v1.40, June 12, 2014 -- Initial public release. +v1.42, June 19, 2014 -- Removed dependency on simplejson diff --git a/examples/artist_discography.py b/examples/artist_discography.py index a0dc72e..34bb625 100644 --- a/examples/artist_discography.py +++ b/examples/artist_discography.py @@ -1,4 +1,3 @@ - import sys import spotipy diff --git a/setup.py b/setup.py index b842d98..08d0410 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,11 @@ from setuptools import setup setup( name='SpotipyWebApi', - version='1.41', + version='1.42', description='simple client for the Spotify Web API', author="@plamere", author_email="paul@echonest.com", url='http://github.com/plamere/spotipy', - install_requires=['requests>=1.0', 'simplejson>=3.5.2'], + install_requires=['requests>=1.0'], license='LICENSE.txt', py_modules=['spotipy', 'spotipy.oauth2'],) diff --git a/spotipy/__init__.py b/spotipy/__init__.py index c39e2e3..beb039e 100644 --- a/spotipy/__init__.py +++ b/spotipy/__init__.py @@ -4,7 +4,7 @@ from __future__ import print_function import base64 import requests -import simplejson as json +import json __all__ = ['oauth2'] diff --git a/spotipy/oauth2.py b/spotipy/oauth2.py index 1dc8856..09e8f3a 100644 --- a/spotipy/oauth2.py +++ b/spotipy/oauth2.py @@ -2,7 +2,7 @@ import base64 import urllib import requests import os -import simplejson as json +import json import time class SpotifyOauthError(Exception): diff --git a/tests/tests.py b/tests/tests.py index f5f06ca..35c6676 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -86,7 +86,7 @@ class TestSpotipy(unittest.TestCase): results = self.spotify.search(q='weezer pinkerton', type='album') self.assertTrue('albums' in results) self.assertTrue(len(results['albums']['items']) > 0) - self.assertTrue(results['albums']['items'][0]['name'] == 'Pinkerton') + self.assertTrue(results['albums']['items'][0]['name'].find('Pinkerton') >= 0) def test_track_search(self): results = self.spotify.search(q='el scorcho weezer', type='track')