Started books per page algorithm, updated some tests

This commit is contained in:
Mike
2019-11-07 00:38:08 -05:00
parent 8a39fb5aa8
commit 8e61105cbb
9 changed files with 51 additions and 11 deletions

1
tests/.#test_bookserver.py Symbolic link
View File

@@ -0,0 +1 @@
raelon@golumnsec.2706:1573068976

1
tests/.#test_library.py Symbolic link
View File

@@ -0,0 +1 @@
raelon@golumnsec.2706:1573068976

View File

@@ -1,11 +1,17 @@
import unittest
import sys
import unittest
from lib.pyShelf import BookDisplay, BookServer
sys.path.insert(0, '../lib')
sys.path.insert(1, '../')
from pyShelf import BookServer
class BookServerTest(unittest.TestCase):
def test_bookserver(self):
server = BookServer()
self.assertTrue(server.run())
def test_booksPerPage(self):
x, y = 900, 450
self.assertGreater(BookDisplay().booksPerPage([x,y]), 0)

View File

@@ -1,6 +1,8 @@
import unittest
# sys.path.insert(1, '../')
from lib.library import Catalogue
Catalogue = Catalogue()
@@ -12,9 +14,6 @@ class LibraryTest(unittest.TestCase):
def test_library_catalogue_filter_books(self):
self.assertIsNotNone(Catalogue.filter_books())
def test_library_catalogue_new_files(self):
self.assertIsNot(Catalogue.new_files(), False)
if __name__ == '__main__':
unittest.main()

View File

@@ -1,10 +1,10 @@
import unittest
import os
import shutil
import sys
import unittest
# sys.path.insert(1, '../')
from lib.pyShelf import InitFiles
from lib.pyShelf import Epub
class SysIoTest(unittest.TestCase):