[REF] Less Files

This commit is contained in:
2026-02-13 15:07:11 +01:00
parent 75c295ce4b
commit 368038bdb9
9 changed files with 16 additions and 62 deletions

View File

@@ -120,9 +120,22 @@ class TestDB(unittest.TestCase):
library = read(self.session, 1)
library.name = "Another Library"
update(self.session, library)
self.assertEqual(library.name, self.library.name)
self.assertNotEqual(library.name, "Library Test")
self.assertEqual(library.name, "Another Library")
library1 = read(self.session, 1)
self.assertEqual(library1.name, self.library.name)
self.assertNotEqual(library1.name, "Library Test")
self.assertEqual(library1.name, "Another Library")
def test_update_name(self):
library = read(self.session, 1)
library.books[0].name = "Another Book on the shelf"
update(self.session, library)
library1 = read(self.session, 1)
book = library1.books[0]
self.assertEqual(book.name, self.library.books[0].name)
self.assertNotEqual(book.name, "Test book")
self.assertEqual(book.name, "Another Book on the shelf")
if __name__ == "__main__":