test: use item that allows fractional UOM in test (#26837)

This commit is contained in:
Ankush 2021-08-06 19:36:21 +05:30 committed by GitHub
parent f1141e7756
commit 614336fe1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,9 +23,7 @@ class TestPurchaseReceipt(unittest.TestCase):
def test_reverse_purchase_receipt_sle(self):
frappe.db.set_value('UOM', '_Test UOM', 'must_be_whole_number', 0)
pr = make_purchase_receipt(qty=0.5)
pr = make_purchase_receipt(qty=0.5, item_code="_Test Item Home Desktop 200")
sl_entry = frappe.db.get_all("Stock Ledger Entry", {"voucher_type": "Purchase Receipt",
"voucher_no": pr.name}, ['actual_qty'])
@ -41,8 +39,6 @@ class TestPurchaseReceipt(unittest.TestCase):
self.assertEqual(len(sl_entry_cancelled), 2)
self.assertEqual(sl_entry_cancelled[1].actual_qty, -0.5)
frappe.db.set_value('UOM', '_Test UOM', 'must_be_whole_number', 1)
def test_make_purchase_invoice(self):
if not frappe.db.exists('Payment Terms Template', '_Test Payment Terms Template For Purchase Invoice'):
frappe.get_doc({