first commit
This commit is contained in:
2
modules/sale_history/tests/__init__.py
Normal file
2
modules/sale_history/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
modules/sale_history/tests/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
modules/sale_history/tests/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
42
modules/sale_history/tests/scenario_sale_history.rst
Normal file
42
modules/sale_history/tests/scenario_sale_history.rst
Normal file
@@ -0,0 +1,42 @@
|
||||
=====================
|
||||
Sale History Scenario
|
||||
=====================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('sale_history', create_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
Normal file
13
modules/sale_history/tests/test_module.py
Normal 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
Normal file
8
modules/sale_history/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