/usr/lib/python3/dist-packages/trytond/modules/account_tax_rule_country/tests/test_account_tax_rule_country.py is in tryton-modules-account-tax-rule-country 4.6.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import unittest
from trytond.pool import Pool
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.modules.company.tests import create_company, set_company
from trytond.modules.account.tests import create_chart
class AccountTaxRuleCountryTestCase(ModuleTestCase):
'Test Account Tax Rule Country module'
module = 'account_tax_rule_country'
@with_transaction()
def test_account_chart(self):
'Test creation and update of minimal chart of accounts'
pool = Pool()
Account = pool.get('account.account')
UpdateChart = pool.get('account.update_chart', type='wizard')
company = create_company()
with set_company(company):
create_chart(company, tax=True)
root, = Account.search([('parent', '=', None)])
session_id, _, _ = UpdateChart.create()
update_chart = UpdateChart(session_id)
update_chart.start.account = root
update_chart.transition_update()
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountTaxRuleCountryTestCase))
return suite
|