test: fix flaky purchase receipt test (#26859)

This commit is contained in:
Ankush 2021-08-09 15:14:26 +05:30 committed by GitHub
parent b3bbebd27c
commit 7ba8c821a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,21 +324,8 @@ class TestPurchaseReceipt(unittest.TestCase):
pr1.submit()
self.assertRaises(frappe.ValidationError, pr2.submit)
frappe.db.rollback()
pr1.cancel()
se.cancel()
se1.cancel()
se2.cancel()
se3.cancel()
po.reload()
pr2.load_from_db()
if pr2.docstatus == 1 and frappe.db.get_value('Stock Ledger Entry',
{'voucher_no': pr2.name, 'is_cancelled': 0}, 'name'):
pr2.cancel()
po.load_from_db()
po.cancel()
def test_serial_no_supplier(self):
pr = make_purchase_receipt(item_code="_Test Serialized Item With Series", qty=1)