Faircot cron
This commit is contained in:
@@ -9223,6 +9223,26 @@ description</t></is></c>
|
||||
patch.object(lot_module.LotQt, 'search', return_value=[]):
|
||||
lot_module.LotQt.match_lots([purchase_lot], [])
|
||||
|
||||
def test_physical_lot_tolerance_warning_can_be_skipped_by_context(self):
|
||||
'physical lot tolerance warning can be skipped for automation cron'
|
||||
line = Mock(
|
||||
purchase=Mock(number='P-1'),
|
||||
sale=None,
|
||||
id=12,
|
||||
quantity_theorical=Decimal('100'),
|
||||
tol_max=Decimal('0'),
|
||||
inherit_tol=False,
|
||||
unit=None,
|
||||
lots=[],
|
||||
)
|
||||
lqt = Mock(lot_p=Mock(line=line), lot_s=None)
|
||||
physical_lot = Mock(lot_quantity=Decimal('120'), lot_unit_line=None)
|
||||
|
||||
with Transaction().set_context(
|
||||
_purchase_trade_skip_physical_lot_tolerance_warning=True):
|
||||
lot_module.LotQt._warn_physical_lot_tolerance(
|
||||
lqt, [physical_lot])
|
||||
|
||||
def test_lot_matching_gauge_uses_entered_quantity_to_match(self):
|
||||
'go to matching gauge projects tolerance from qt to match'
|
||||
matching_lot = lot_module.LotMatchingLot()
|
||||
|
||||
Reference in New Issue
Block a user