Skip to content

Commit

Permalink
refactor(test): update repost settings for test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 7, 2023
1 parent b651b36 commit ac79b84
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ def setUp(self):
self.create_company()
self.create_customer()
self.create_item()
self.update_repost_settings()

def teadDown(self):
frappe.db.rollback()

def update_repost_settings(self):
allowed_types = ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]
repost_settings = frappe.get_doc("Repost Accounting Ledger Settings")
for x in allowed_types:
repost_settings.append("allowed_types", {"document_type": x, "allowed": True})
repost_settings.save()

def test_01_basic_functions(self):
si = create_sales_invoice(
item=self.item,
Expand Down

0 comments on commit ac79b84

Please sign in to comment.