mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Started books per page algorithm, updated some tests
This commit is contained in:
1
tests/.#test_bookserver.py
Symbolic link
1
tests/.#test_bookserver.py
Symbolic link
@@ -0,0 +1 @@
|
||||
raelon@golumnsec.2706:1573068976
|
||||
1
tests/.#test_library.py
Symbolic link
1
tests/.#test_library.py
Symbolic link
@@ -0,0 +1 @@
|
||||
raelon@golumnsec.2706:1573068976
|
||||
Binary file not shown.
Binary file not shown.
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user