Initial import from Docker volume
This commit is contained in:
2
modules/sale_history/tests/__init__.py
Executable file
2
modules/sale_history/tests/__init__.py
Executable 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
modules/sale_history/tests/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/sale_history/tests/__pycache__/__init__.cpython-311.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/__init__.cpython-311.pyc
Executable file
Binary file not shown.
BIN
modules/sale_history/tests/__pycache__/test_module.cpython-311.opt-1.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/test_module.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/sale_history/tests/__pycache__/test_module.cpython-311.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/test_module.cpython-311.pyc
Executable file
Binary file not shown.
BIN
modules/sale_history/tests/__pycache__/test_scenario.cpython-311.opt-1.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/test_scenario.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/sale_history/tests/__pycache__/test_scenario.cpython-311.pyc
Executable file
BIN
modules/sale_history/tests/__pycache__/test_scenario.cpython-311.pyc
Executable file
Binary file not shown.
47
modules/sale_history/tests/scenario_sale_history.rst
Executable file
47
modules/sale_history/tests/scenario_sale_history.rst
Executable file
@@ -0,0 +1,47 @@
|
||||
=====================
|
||||
Sale History Scenario
|
||||
=====================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('sale_history')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create customer::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> customer = Party(name='Customer')
|
||||
>>> customer.save()
|
||||
|
||||
Create a sale::
|
||||
|
||||
>>> Sale = Model.get('sale.sale')
|
||||
>>> sale = Sale()
|
||||
>>> sale.party = customer
|
||||
>>> sale.click('quote')
|
||||
|
||||
>>> sale.number
|
||||
'1'
|
||||
>>> sale.revision
|
||||
0
|
||||
>>> sale.rec_name
|
||||
'1'
|
||||
|
||||
Reset to draft increases revision::
|
||||
|
||||
>>> sale.click('draft')
|
||||
|
||||
>>> sale.revision
|
||||
1
|
||||
>>> sale.rec_name
|
||||
'1/1'
|
||||
13
modules/sale_history/tests/test_module.py
Executable file
13
modules/sale_history/tests/test_module.py
Executable file
@@ -0,0 +1,13 @@
|
||||
# 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 SaleHistoryTestCase(ModuleTestCase):
|
||||
'Test Sale History module'
|
||||
module = 'sale_history'
|
||||
extras = ['sale_subscription']
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
8
modules/sale_history/tests/test_scenario.py
Executable file
8
modules/sale_history/tests/test_scenario.py
Executable 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