test: use fixture for payment entry test cases (#31390)

refactor: use fixture for payment entry test cases
This commit is contained in:
ruthra kumar 2022-06-17 17:23:29 +05:30 committed by GitHub
parent 74a782d81d
commit 05467ffce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import flt, nowdate
from erpnext.accounts.doctype.payment_entry.payment_entry import (
@ -24,7 +25,10 @@ from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_orde
test_dependencies = ["Item"]
class TestPaymentEntry(unittest.TestCase):
class TestPaymentEntry(FrappeTestCase):
def tearDown(self):
frappe.db.rollback()
def test_payment_entry_against_order(self):
so = make_sales_order()
pe = get_payment_entry("Sales Order", so.name, bank_account="_Test Cash - _TC")