first commit
This commit is contained in:
2
tests/__init__.py
Normal file
2
tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
BIN
tests/__pycache__/test_module.cpython-311.pyc
Normal file
BIN
tests/__pycache__/test_module.cpython-311.pyc
Normal file
Binary file not shown.
BIN
tests/__pycache__/test_scenario.cpython-311.pyc
Normal file
BIN
tests/__pycache__/test_scenario.cpython-311.pyc
Normal file
Binary file not shown.
35
tests/scenario_sale_line_delete_log.rst
Normal file
35
tests/scenario_sale_line_delete_log.rst
Normal file
@@ -0,0 +1,35 @@
|
||||
=============================
|
||||
Sale Line Delete Log Scenario
|
||||
=============================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> import datetime as dt
|
||||
>>> today = dt.date.today()
|
||||
|
||||
|
||||
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('sale_line_delete_log')
|
||||
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal years::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> periods = fiscalyear.periods
|
||||
>>> len(periods)
|
||||
12
|
||||
>>> period_1, period_3, period_5 = periods[0], periods[2], periods[4]
|
||||
11
tests/test_module.py
Normal file
11
tests/test_module.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class SaleLineDeleteLogTestCase(ModuleTestCase):
|
||||
"Test Sale Line Delete Log module"
|
||||
module = 'sale_line_delete_log'
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
8
tests/test_scenario.py
Normal file
8
tests/test_scenario.py
Normal file
@@ -0,0 +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.
|
||||
|
||||
from trytond.tests.test_tryton import load_doc_tests
|
||||
|
||||
|
||||
def load_tests(*args, **kwargs):
|
||||
return load_doc_tests(__name__, __file__, *args, **kwargs)
|
||||
Reference in New Issue
Block a user