Fixed album search test

This commit is contained in:
Paul Lamere 2014-06-19 14:41:52 -04:00
parent 9b5b65073c
commit ceaa030468
6 changed files with 7 additions and 7 deletions

View File

@ -1,2 +1,3 @@
v<version>, <date> -- Initial release.
v1.40, June 12, 2014 -- Initial public release.
v1.42, June 19, 2014 -- Removed dependency on simplejson

View File

@ -1,4 +1,3 @@
import sys
import spotipy

View File

@ -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'],)

View File

@ -4,7 +4,7 @@ from __future__ import print_function
import base64
import requests
import simplejson as json
import json
__all__ = ['oauth2']

View File

@ -2,7 +2,7 @@ import base64
import urllib
import requests
import os
import simplejson as json
import json
import time
class SpotifyOauthError(Exception):

View File

@ -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')