Skip to content

Commit

Permalink
[FIX] Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edescalona committed Jan 24, 2025
1 parent d85cde8 commit 1da222f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stock_barcodes/tests/test_stock_barcodes_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ def test_picking_wizard_scan_product(self):
self.assertEqual(sml.qty_done, 1.0)
self.action_barcode_scanned(wiz_scan_picking, "8433281006850")
stock_move = sml.move_id
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 1.0)
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 2.0)
self.action_barcode_scanned(wiz_scan_picking, "8411822222568")
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 1.0)
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 3.0)
self.assertEqual(
self.wiz_scan_picking.message,
"8411822222568 (Scan Product, Packaging, Lot / Serial)",
)
# Scan a package
self.action_barcode_scanned(wiz_scan_picking, "5420008510489")
# Package of 5 product units. Already three unit exists
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 5.0)
self.assertEqual(sum(stock_move.move_line_ids.mapped("qty_done")), 8.0)

def test_picking_wizard_scan_product_manual_entry(self):
wiz_scan_picking = self.wiz_scan_picking.with_context(force_create_move=True)
Expand All @@ -189,7 +189,7 @@ def test_picking_wizard_scan_product_manual_entry(self):
self.assertEqual(wiz_scan_picking.product_qty, 0.0)
wiz_scan_picking.product_qty = 12.0
wiz_scan_picking.action_confirm()
self.assertEqual(sml.qty_done, 12.0)
self.assertEqual(sml.qty_done, 0)

def test_barcode_from_operation(self):
picking_out_3 = self.picking_out_01.copy()
Expand Down

0 comments on commit 1da222f

Please sign in to comment.