Skip to content
Snippets Groups Projects
Commit 08fe5892 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix tests for series

parent a21bc252
No related branches found
No related tags found
No related merge requests found
......@@ -243,7 +243,7 @@ class opdsScanner:
if book_data.series_info:
ser = opdsdb.addseries(book_data.series_info['title'])
ser_no = book_data.series_info['index']
ser_no = book_data.series_info['index'] or '0'
ser_no = int(ser_no) if ser_no.isdigit() else 0
opdsdb.addbseries(book,ser,ser_no)
else:
......
......@@ -166,5 +166,5 @@ class scanTestCase(TestCase):
self.assertEquals(Book.objects.all().count(), 6)
self.assertEquals(Author.objects.all().count(), 6)
self.assertEquals(Genre.objects.all().count(), 5)
self.assertEquals(Series.objects.all().count(), 0)
self.assertEquals(Series.objects.all().count(), 1)
self.assertEquals(Catalog.objects.all().count(), 2)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment