mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
test: remove unnecessary creation of companies #28965
test: remove unnecessary creation of companies
This commit is contained in:
@@ -8,13 +8,8 @@ test_records = frappe.get_test_records('Company')
|
||||
|
||||
class TestInit(unittest.TestCase):
|
||||
def test_encode_company_abbr(self):
|
||||
company = frappe.new_doc("Company")
|
||||
company.company_name = "New from Existing Company For Test"
|
||||
company.abbr = "NFECT"
|
||||
company.default_currency = "INR"
|
||||
company.save()
|
||||
|
||||
abbr = company.abbr
|
||||
abbr = "NFECT"
|
||||
|
||||
names = [
|
||||
"Warehouse Name", "ERPNext Foundation India", "Gold - Member - {a}".format(a=abbr),
|
||||
@@ -32,7 +27,7 @@ class TestInit(unittest.TestCase):
|
||||
]
|
||||
|
||||
for i in range(len(names)):
|
||||
enc_name = encode_company_abbr(names[i], company.name)
|
||||
enc_name = encode_company_abbr(names[i], abbr=abbr)
|
||||
self.assertTrue(
|
||||
enc_name == expected_names[i],
|
||||
"{enc} is not same as {exp}".format(enc=enc_name, exp=expected_names[i])
|
||||
|
||||
Reference in New Issue
Block a user