Skip to content

Commit

Permalink
fix: clear dimension defaults after test
Browse files Browse the repository at this point in the history
(cherry picked from commit 23e56d3)
  • Loading branch information
GursheenK authored and mergify[bot] committed Aug 18, 2023
1 parent 7ac35b4 commit 2a467a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,7 @@ def test_offsetting_entries_for_accounting_dimensions(self):
from erpnext.accounts.report.trial_balance.test_trial_balance import (
clear_dimension_defaults,
create_accounting_dimension,
disable_dimension,
)

create_account(
Expand Down Expand Up @@ -1783,6 +1784,7 @@ def test_offsetting_entries_for_accounting_dimensions(self):
check_acc_dimensions=True,
)
clear_dimension_defaults("Branch")
disable_dimension()


def set_advance_flag(company, flag, default_account):
Expand Down
3 changes: 1 addition & 2 deletions erpnext/accounts/report/trial_balance/test_trial_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def test_offsetting_entries_for_accounting_dimensions(self):
self.assertEqual(total_row["debit"], total_row["credit"])

def tearDown(self):
clear_dimension_defaults("Branch")
disable_dimension()


Expand Down Expand Up @@ -91,8 +92,6 @@ def create_accounting_dimension(**args):
accounting_dimension = frappe.get_doc("Accounting Dimension", document_type)
accounting_dimension.disabled = 0

clear_dimension_defaults(document_type)
accounting_dimension.load_from_db()
accounting_dimension.append(
"dimension_defaults",
{
Expand Down

0 comments on commit 2a467a9

Please sign in to comment.