mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-30 20:18:27 +00:00
refactor(test): use change_settings decorator
(cherry picked from commit ee94fb37c8)
# Conflicts:
# erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
This commit is contained in:
@@ -4019,6 +4019,7 @@ class TestSalesInvoice(FrappeTestCase):
|
||||
self.assertEqual(len(actual), 4)
|
||||
self.assertEqual(expected, actual)
|
||||
|
||||
@change_settings("Accounts Settings", {"enable_common_party_accounting": True})
|
||||
def test_common_party_with_foreign_currency_jv(self):
|
||||
from erpnext.accounts.doctype.account.test_account import create_account
|
||||
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
|
||||
@@ -4065,11 +4066,8 @@ class TestSalesInvoice(FrappeTestCase):
|
||||
supp_doc.append("accounts", test_account_details)
|
||||
supp_doc.save()
|
||||
|
||||
# enable common party accounting
|
||||
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1)
|
||||
|
||||
# create a party link between customer & supplier
|
||||
party_link = create_party_link("Supplier", supplier, customer)
|
||||
create_party_link("Supplier", supplier, customer)
|
||||
|
||||
# create a sales invoice
|
||||
si = create_sales_invoice(
|
||||
@@ -4103,10 +4101,13 @@ class TestSalesInvoice(FrappeTestCase):
|
||||
self.assertTrue(jv)
|
||||
self.assertEqual(jv[0], si.grand_total)
|
||||
|
||||
<<<<<<< HEAD
|
||||
party_link.delete()
|
||||
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0)
|
||||
|
||||
>>>>>>> 740a04a704 (test: add unit test for common party with foreign currency)
|
||||
=======
|
||||
>>>>>>> ee94fb37c8 (refactor(test): use change_settings decorator)
|
||||
|
||||
def set_advance_flag(company, flag, default_account):
|
||||
frappe.db.set_value(
|
||||
|
||||
Reference in New Issue
Block a user