added test_runner

This commit is contained in:
Rushabh Mehta 2013-02-05 19:20:51 +05:30
parent cdc32d02b2
commit 4e95bb59a0
4 changed files with 22 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class DocType:
self.validate_balance_leaves()
self.validate_leave_overlap()
self.validate_max_days()
#self.validate_block_days()
self.validate_block_days()
def on_submit(self):
if self.doc.status != "Approved":

View File

@ -19,4 +19,11 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
self.doc, self.doclist = d, dl
test_records = [
[{
"leave_type_name": "_Test Leave Type",
"doctype": "Leave Type"
}]
]

View File

@ -165,8 +165,6 @@ class DocType:
ac_obj.validate()
ac_obj.doc.save(1)
ac_obj.on_update()
sql("commit")
sql("start transaction")
# Set letter head
@ -257,3 +255,12 @@ class DocType:
sql("update `tabSingles` set value = %s where doctype='Global Defaults' and field = 'default_company' and value = %s", (newdn, olddn))
if get_defaults('company') == olddn:
set_default('company', newdn)
test_records = [
[{
"company_name": "_Test Company",
"abbr": "TC",
"default_currency": "INR",
"doctype": "Company"
}]
]

View File

@ -19,4 +19,7 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
self.doc, self.doclist = d, dl
# already set
test_records = []