added test_runner
This commit is contained in:
parent
cdc32d02b2
commit
4e95bb59a0
@ -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":
|
||||
|
@ -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"
|
||||
}]
|
||||
]
|
@ -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"
|
||||
}]
|
||||
]
|
@ -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 = []
|
Loading…
Reference in New Issue
Block a user