diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index 1b08a228b6c..8debef5ff69 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -4,6 +4,8 @@ from __future__ import unicode_literals import frappe import unittest +import json +from frappe import _ from frappe.utils import random_string from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_charts_for_country @@ -78,7 +80,10 @@ class TestCompany(unittest.TestCase): if account_type in ["Bank", "Cash"]: filters["is_group"] = 1 - self.assertTrue(frappe.get_all("Account", filters)) + has_matching_accounts = frappe.get_all("Account", filters) + error_message = _("No Account matched these filters: {}".format(json.dumps(filters))) + + self.assertTrue(has_matching_accounts, msg=error_message) finally: self.delete_mode_of_payment(template) frappe.delete_doc("Company", template)