mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
refactor(test): disable unwanted dimensions
This commit is contained in:
@@ -3,6 +3,7 @@ from frappe import qb
|
|||||||
from frappe.tests import IntegrationTestCase
|
from frappe.tests import IntegrationTestCase
|
||||||
from frappe.utils import getdate, today
|
from frappe.utils import getdate, today
|
||||||
|
|
||||||
|
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import disable_dimension
|
||||||
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
|
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +19,16 @@ class TestReactivity(AccountsTestMixin, IntegrationTestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
frappe.db.rollback()
|
frappe.db.rollback()
|
||||||
|
|
||||||
|
def disable_dimensions(self):
|
||||||
|
res = frappe.db.get_all("Accounting Dimension", filters={"disabled": False})
|
||||||
|
for x in res:
|
||||||
|
dim = frappe.get_doc("Accounting Dimension", x.name)
|
||||||
|
dim.disabled = True
|
||||||
|
dim.save()
|
||||||
|
|
||||||
def test_01_basic_item_details(self):
|
def test_01_basic_item_details(self):
|
||||||
|
self.disable_dimensions()
|
||||||
|
|
||||||
# set Item Price
|
# set Item Price
|
||||||
frappe.get_doc(
|
frappe.get_doc(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user