refactor(test): make and use a different party for subscription

(cherry picked from commit 3fabf4aaa4)
This commit is contained in:
ruthra kumar
2024-06-22 19:32:07 +05:30
committed by Mergify
parent 6dbe820416
commit c45ce75f57

View File

@@ -476,7 +476,7 @@ class TestSubscription(FrappeTestCase):
start_date="2021-01-01",
submit_invoice=0,
generate_new_invoices_past_due_date=1,
party="_Test Subscription Customer",
party="_Test Subscription Customer John Doe",
)
# create invoices for the first two moths
@@ -569,6 +569,12 @@ def create_parties():
customer.append("accounts", {"company": "_Test Company", "account": "_Test Receivable USD - _TC"})
customer.insert()
if not frappe.db.exists("Customer", "_Test Subscription Customer John Doe"):
customer = frappe.new_doc("Customer")
customer.customer_name = "_Test Subscription Customer John Doe"
customer.append("accounts", {"company": "_Test Company", "account": "_Test Receivable - _TC"})
customer.insert()
def reset_settings():
settings = frappe.get_single("Subscription Settings")