chore(test): fix broken unit test

(cherry picked from commit 70dd9d0671)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
This commit is contained in:
ruthra kumar
2023-07-17 12:29:42 +05:30
committed by Mergify
parent 4094fbc3e5
commit 395f87a0f8
2 changed files with 8 additions and 3 deletions

View File

@@ -3213,9 +3213,11 @@ class TestSalesInvoice(unittest.TestCase):
account.disabled = 0
account.save()
@change_settings("Accounts Settings", {"unlink_payment_on_cancel_of_invoice": 1})
def test_gain_loss_with_advance_entry(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
<<<<<<< HEAD
unlink_enabled = frappe.db.get_value(
"Accounts Settings", "Accounts Settings", "unlink_payment_on_cancel_of_invoice"
)
@@ -3224,6 +3226,8 @@ class TestSalesInvoice(unittest.TestCase):
"Accounts Settings", "Accounts Settings", "unlink_payment_on_cancel_of_invoice", 1
)
=======
>>>>>>> 70dd9d0671 (chore(test): fix broken unit test)
jv = make_journal_entry("_Test Receivable USD - _TC", "_Test Bank - _TC", -7000, save=False)
jv.accounts[0].exchange_rate = 70
@@ -3265,10 +3269,13 @@ class TestSalesInvoice(unittest.TestCase):
check_gl_entries(self, si.name, expected_gle, nowdate())
<<<<<<< HEAD
frappe.db.set_value(
"Accounts Settings", "Accounts Settings", "unlink_payment_on_cancel_of_invoice", unlink_enabled
)
=======
>>>>>>> 70dd9d0671 (chore(test): fix broken unit test)
def test_batch_expiry_for_sales_invoice_return(self):
from erpnext.controllers.sales_and_purchase_return import make_return_doc
from erpnext.stock.doctype.item.test_item import make_item

View File

@@ -37,6 +37,7 @@ def make_supplier(supplier_name, currency=None):
supplier = frappe.new_doc("Supplier")
supplier.supplier_name = supplier_name
supplier.supplier_type = "Individual"
supplier.supplier_group = "All Supplier Groups"
if currency:
supplier.default_currency = currency
@@ -55,9 +56,6 @@ class TestAccountsController(unittest.TestCase):
10 series - Sales Invoice against Payment Entries
20 series - Sales Invoice against Journals
30 series - Sales Invoice against Credit Notes
40 series - Purchase Invoice against Payment Entries
50 series - Purchase Invoice against Journals
60 series - Purchase Invoice against Debit Notes
"""
def setUp(self):