Test case cleanup and fixes

This commit is contained in:
Nabin Hait
2015-03-13 08:14:31 +05:30
parent c8c1d1c693
commit 7c9d003917
24 changed files with 864 additions and 1270 deletions

View File

@@ -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!!"))

View File

@@ -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",
}

View File

@@ -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",