book/line: logging, model: cache-write skip existing values

This commit is contained in:
Frederik Jaeckel 2023-03-04 21:24:19 +01:00
parent 179543bcf0
commit 03324d5944
4 changed files with 81 additions and 35 deletions

View file

@ -190,11 +190,11 @@ class BookTestCase(ModuleTestCase):
self.assertEqual(book.rec_name, 'Level 1')
self.assertEqual(len(book.childs), 1)
self.assertEqual(book.childs[0].rec_name, 'Level 1/Level 2 | 0.00 usd | Open')
self.assertEqual(book.get_cachekeys_by_hierarchy(), [CACHEKEY_CASHBOOK % book.id])
self.assertEqual(book.childs[0].get_cachekeys_by_hierarchy(), [
CACHEKEY_CASHBOOK % book.id,
CACHEKEY_CASHBOOK % book.childs[0].id
])
# ~ self.assertEqual(book.get_cachekeys_by_hierarchy(), [CACHEKEY_CASHBOOK % book.id])
# ~ self.assertEqual(book.childs[0].get_cachekeys_by_hierarchy(), [
# ~ CACHEKEY_CASHBOOK % book.id,
# ~ CACHEKEY_CASHBOOK % book.childs[0].id
# ~ ])
@with_transaction()
def test_book_deny_delete_open(self):