From 5d85b35f41d792879e47d63ec2bf45696ee6553c Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 2 Mar 2022 12:29:03 +0530 Subject: [PATCH] test: fix flaky bin value test --- .../doctype/purchase_receipt/test_purchase_receipt.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index a24acb1bd8..fa28f2252d 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -161,6 +161,15 @@ class TestPurchaseReceipt(FrappeTestCase): qty=abs(existing_bin_qty) ) + existing_bin_qty, existing_bin_stock_value = frappe.db.get_value( + "Bin", + { + "item_code": "_Test Item", + "warehouse": "_Test Warehouse - _TC" + }, + ["actual_qty", "stock_value"] + ) + pr = make_purchase_receipt() stock_value_difference = frappe.db.get_value(