Skip to content

Commit

Permalink
[FIX] stock_barcodes: Make tests more resilient
Browse files Browse the repository at this point in the history
UID = 1 is sometimes called "System" and sometimes "OdooBot", depending on the
installed set of modules, so tests can fail if you rely on this data.

Removing that variable from the tests, we get resilient tests.
  • Loading branch information
pedrobaeza committed Jul 26, 2020
1 parent c0b2eaa commit dab52c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stock_barcodes/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Stock Barcodes",
"summary": "It provides read barcode on stock operations.",
"version": "13.0.1.0.0",
"version": "13.0.1.0.1",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-barcode",
"license": "AGPL-3",
Expand Down
5 changes: 2 additions & 3 deletions stock_barcodes/tests/test_stock_barcodes_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ def test_inventory_values(self):
self.wiz_scan_inventory.res_model_id, self.stock_inventory_model
)
self.assertEqual(self.wiz_scan_inventory.res_id, self.inventory.id)
self.assertEqual(
self.wiz_scan_inventory.display_name,
"Barcode reader - Test Inventory - OdooBot",
self.assertIn(
"Barcode reader - Test Inventory - ", self.wiz_scan_inventory.display_name,
)

def test_inventory_wizard_scan_product(self):
Expand Down

0 comments on commit dab52c9

Please sign in to comment.