mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-27 05:45:19 +00:00
Test case cleanup and fixes
This commit is contained in:
@@ -17,8 +17,6 @@ import install_fixtures
|
||||
@frappe.whitelist()
|
||||
def setup_account(args=None):
|
||||
try:
|
||||
frappe.clear_cache()
|
||||
|
||||
if frappe.db.sql("select name from tabCompany"):
|
||||
frappe.throw(_("Setup Already Complete!!"))
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ args = {
|
||||
"supplier_3": "Digital Ocean",
|
||||
"tax_1": "Service Tax",
|
||||
"tax_rate_1": "12.5",
|
||||
"timezone": "Asia/Calcutta",
|
||||
"timezone": "America/New_York",
|
||||
"password": "password",
|
||||
"email": "test@erpnext.com",
|
||||
}
|
||||
|
||||
@@ -30,9 +30,10 @@ def get_ancestors_of(doctype, name):
|
||||
return result or []
|
||||
|
||||
def before_tests():
|
||||
frappe.clear_cache()
|
||||
# complete setup if missing
|
||||
from erpnext.setup.page.setup_wizard.setup_wizard import setup_account
|
||||
if not frappe.get_list("Item Group"):
|
||||
if not frappe.get_list("Company"):
|
||||
setup_account({
|
||||
"currency" :"USD",
|
||||
"first_name" :"Test",
|
||||
|
||||
Reference in New Issue
Block a user