Initial import from Docker volume
This commit is contained in:
36
modules/incoterm/tests/test_module.py
Executable file
36
modules/incoterm/tests/test_module.py
Executable file
@@ -0,0 +1,36 @@
|
||||
# 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 unittest.mock import MagicMock
|
||||
|
||||
from trytond.modules.company.tests import CompanyTestMixin
|
||||
from trytond.pool import Pool
|
||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
|
||||
|
||||
class IncotermTestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'Test Incoterm module'
|
||||
module = 'incoterm'
|
||||
extras = [
|
||||
'carrier', 'company', 'purchase', 'purchase_request_quotation',
|
||||
'sale', 'sale_shipment_cost', 'sale_opportunity',
|
||||
'sale_shipment_grouping', 'stock', 'account_invoice',
|
||||
'account_invoice_stock']
|
||||
|
||||
@with_transaction()
|
||||
def test_shipment_grouping(self):
|
||||
"Test fields to group shipment"
|
||||
pool = Pool()
|
||||
Sale = pool.get('sale.sale')
|
||||
ShipmentOut = pool.get('stock.shipment.out')
|
||||
|
||||
sale = Sale()
|
||||
shipment = MagicMock(spec=ShipmentOut)
|
||||
|
||||
fields = sale._get_shipment_grouping_fields(shipment)
|
||||
|
||||
self.assertLessEqual({'incoterm', 'incoterm_location'}, fields)
|
||||
self.assertLessEqual(fields, ShipmentOut._fields.keys())
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
Reference in New Issue
Block a user