mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Fixed album search test
This commit is contained in:
parent
9b5b65073c
commit
ceaa030468
@ -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
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import spotipy
|
import spotipy
|
||||||
|
|
||||||
|
4
setup.py
4
setup.py
@ -3,11 +3,11 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='SpotipyWebApi',
|
name='SpotipyWebApi',
|
||||||
version='1.41',
|
version='1.42',
|
||||||
description='simple client for the Spotify Web API',
|
description='simple client for the Spotify Web API',
|
||||||
author="@plamere",
|
author="@plamere",
|
||||||
author_email="paul@echonest.com",
|
author_email="paul@echonest.com",
|
||||||
url='http://github.com/plamere/spotipy',
|
url='http://github.com/plamere/spotipy',
|
||||||
install_requires=['requests>=1.0', 'simplejson>=3.5.2'],
|
install_requires=['requests>=1.0'],
|
||||||
license='LICENSE.txt',
|
license='LICENSE.txt',
|
||||||
py_modules=['spotipy', 'spotipy.oauth2'],)
|
py_modules=['spotipy', 'spotipy.oauth2'],)
|
||||||
|
@ -4,7 +4,7 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import base64
|
import base64
|
||||||
import requests
|
import requests
|
||||||
import simplejson as json
|
import json
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['oauth2']
|
__all__ = ['oauth2']
|
||||||
|
@ -2,7 +2,7 @@ import base64
|
|||||||
import urllib
|
import urllib
|
||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
import simplejson as json
|
import json
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class SpotifyOauthError(Exception):
|
class SpotifyOauthError(Exception):
|
||||||
|
@ -86,7 +86,7 @@ class TestSpotipy(unittest.TestCase):
|
|||||||
results = self.spotify.search(q='weezer pinkerton', type='album')
|
results = self.spotify.search(q='weezer pinkerton', type='album')
|
||||||
self.assertTrue('albums' in results)
|
self.assertTrue('albums' in results)
|
||||||
self.assertTrue(len(results['albums']['items']) > 0)
|
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):
|
def test_track_search(self):
|
||||||
results = self.spotify.search(q='el scorcho weezer', type='track')
|
results = self.spotify.search(q='el scorcho weezer', type='track')
|
||||||
|
Loading…
Reference in New Issue
Block a user