fix: validation test for customer group

This commit is contained in:
khushi8112
2026-04-07 02:12:17 +05:30
parent ea3fcc214b
commit 7794f3033e
2 changed files with 4 additions and 2 deletions

View File

@@ -324,7 +324,7 @@ def _make_customer(source_name, target_doc=None, ignore_permissions=False):
target.customer_name = source.lead_name
if not target.customer_group:
target.customer_group = "Individual"
target.customer_group = frappe.db.get_default("Customer Group")
doclist = get_mapped_doc(
"Lead",

View File

@@ -35,7 +35,9 @@ class TestOpportunity(unittest.TestCase):
self.assertEqual(frappe.db.get_value("Lead", opp_doc.party_name, "email_id"), opp_doc.contact_email)
# create new customer and create new contact against 'new.opportunity@example.com'
customer = make_customer(opp_doc.party_name).insert(ignore_permissions=True)
customer = make_customer(opp_doc.party_name)
customer.customer_group = "Individual"
customer.insert(ignore_permissions=True)
contact = frappe.get_doc(
{
"doctype": "Contact",