diff --git a/core/tests.py b/core/tests.py index c2b83595..b9cf5aa9 100755 --- a/core/tests.py +++ b/core/tests.py @@ -318,8 +318,8 @@ class BookLoaderTests(TestCase): def test_ebook(self): edition = bookloader.add_by_oclc('1246014') - # we've seen the public domain status of this book fluctuate. So if the ebook count is 2 then test - if edition.ebooks.count() == 2: + # we've seen the public domain status of this book fluctuate -- and the OCLC number can disappear. So if the ebook count is 2 then test + if edition is not None and edition.ebooks.count() == 2: #self.assertEqual(edition.ebooks.count(), 2) #ebook_epub = edition.ebooks.all()[0] ebook_epub = edition.ebooks.filter(format='epub')[0]