adding some tests

This commit is contained in:
Rolux 2009-07-14 00:34:00 +02:00
parent e34f222e54
commit bf29d8fc5d
2 changed files with 14 additions and 0 deletions

View file

@ -11,6 +11,16 @@ def getId(url):
return url.split("/")[-2] return url.split("/")[-2]
def getData(id): def getData(id):
'''
>>> getData('129689')['cast'][1][1]
u'Marianne'
>>> getData('129689')['credits'][0][0]
u'Jean-Luc Godard'
>>> getData('129689')['posters'][0]
u'http://image.allmusic.com/00/adg/cov200/dru800/u812/u81260bbffr.jpg'
>>> getData('129689')['rating']
u'4.5'
'''
data = { data = {
"url": getUrl(id) "url": getUrl(id)
} }

View file

@ -7,6 +7,10 @@ from oxlib.cache import getUrlUnicode
from oxlib import findRe from oxlib import findRe
def getData(id): def getData(id):
'''
>>> getData('0060304')['posters'][0]
u'http://www.movieposterdb.com/posters/06_03/1967/0060304/l_99688_0060304_639fdd1e.jpg'
'''
data = { data = {
"url": getUrl(id) "url": getUrl(id)
} }