neu: kategorie, config + test

This commit is contained in:
Frederik Jaeckel 2022-08-09 15:08:41 +02:00
parent b9bb433c39
commit d6a8b254a3
28 changed files with 1255 additions and 35 deletions

View file

@ -1,7 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
# -*- coding: utf-8 -*-
# This file is part of the cashbook-module from m-ds for Tryton.
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
import os, requests
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.pool import Pool
from trytond.transaction import Transaction
@ -54,7 +55,7 @@ class BookTestCase(ModuleTestCase):
self.assertEqual(book.state, 'open')
self.assertRaisesRegex(UserError,
"The cash book 'Book 1' cannot be deleted because it contains 1 lines and is not in the status 'Archive'.",
"The cashbook 'Book 1' cannot be deleted because it contains 1 lines and is not in the status 'Archive'.",
Book.delete,
[book])
@ -82,7 +83,7 @@ class BookTestCase(ModuleTestCase):
self.assertEqual(book.state, 'closed')
self.assertRaisesRegex(UserError,
"The cash book 'Book 1' cannot be deleted because it contains 1 lines and is not in the status 'Archive'.",
"The cashbook 'Book 1' cannot be deleted because it contains 1 lines and is not in the status 'Archive'.",
Book.delete,
[book])