adjusted test to expect the title and isbns in the new location

pull/1/head
Ed Summers 2011-09-29 19:07:16 +00:00
parent d653277da6
commit 53ceeb800c
2 changed files with 4 additions and 7 deletions

View File

@ -20,6 +20,8 @@ def gluejar_search(q):
r['author'] = v['authors'][0]
else:
r['author'] = ""
r['isbn_10'] = None
r['isbn_13'] = None
# pull out isbns
for i in v.get('industryIdentifiers', []):

View File

@ -49,17 +49,12 @@ class SearchTests(TestCase):
self.assertEqual(len(results), 10)
r = results[0]
self.assertTrue(r.has_key('name'))
self.assertTrue(r.has_key('title'))
self.assertTrue(r.has_key('author'))
self.assertTrue(r.has_key('description'))
self.assertTrue(r.has_key('image'))
self.assertTrue(r.has_key('publisher'))
self.assertTrue(r.has_key('identifier'))
for r in results:
for i in r['identifier']:
self.assertTrue(i.has_key('name'))
self.assertTrue(i.has_key('value'))
self.assertTrue(r.has_key('isbn_10'))
def test_googlebooks_search(self):
response = search.googlebooks_search('melville')