Revised the BaseTestData class in testlib.py to add journal entries directly to the database instead of through the API, in order to allow the data to be reused, and to speed up the test.

This commit is contained in:
2023-04-12 12:12:11 +08:00
parent 8f2cef8d81
commit 3bada28b8f
4 changed files with 103 additions and 61 deletions

View File

@ -51,8 +51,7 @@ class OffsetTestCase(unittest.TestCase):
JournalEntryLineItem.query.delete()
self.client, self.csrf_token = get_client(self.app, "editor")
self.data: OffsetTestData = OffsetTestData(
self.app, self.client, self.csrf_token)
self.data: OffsetTestData = OffsetTestData(self.app, "editor")
def test_add_receivable_offset(self) -> None:
"""Tests to add the receivable offset.