[UPD] Delete Library
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from sqlalchemy.exc import NoResultFound
|
||||
|
||||
from app.api.actions import install
|
||||
from app.schema.library import Library, Tag, Book, BookTag, Path, Env
|
||||
@@ -135,8 +135,13 @@ class TestDB(unittest.TestCase):
|
||||
|
||||
self.assertEqual(book.name, self.library.data.books[0].name)
|
||||
self.assertNotEqual(book.name, "Test book")
|
||||
self.assertEqual(book.name, "Another Book on the shelf")
|
||||
|
||||
self.assertEqual(book.name, "Another Book on the shelf")
|
||||
|
||||
def test_delete_library(self):
|
||||
library = LibraryController(1, engine=self.engine)
|
||||
library.delete()
|
||||
|
||||
self.assertRaises(NoResultFound, LibraryController, 1, engine=self.engine)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user