added test_runner
This commit is contained in:
parent
cdc32d02b2
commit
4e95bb59a0
@ -39,7 +39,7 @@ class DocType:
|
|||||||
self.validate_balance_leaves()
|
self.validate_balance_leaves()
|
||||||
self.validate_leave_overlap()
|
self.validate_leave_overlap()
|
||||||
self.validate_max_days()
|
self.validate_max_days()
|
||||||
#self.validate_block_days()
|
self.validate_block_days()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
if self.doc.status != "Approved":
|
if self.doc.status != "Approved":
|
||||||
|
@ -20,3 +20,10 @@ import webnotes
|
|||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, d, dl):
|
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.validate()
|
||||||
ac_obj.doc.save(1)
|
ac_obj.doc.save(1)
|
||||||
ac_obj.on_update()
|
ac_obj.on_update()
|
||||||
sql("commit")
|
|
||||||
sql("start transaction")
|
|
||||||
|
|
||||||
|
|
||||||
# Set letter head
|
# 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))
|
sql("update `tabSingles` set value = %s where doctype='Global Defaults' and field = 'default_company' and value = %s", (newdn, olddn))
|
||||||
if get_defaults('company') == olddn:
|
if get_defaults('company') == olddn:
|
||||||
set_default('company', newdn)
|
set_default('company', newdn)
|
||||||
|
|
||||||
|
test_records = [
|
||||||
|
[{
|
||||||
|
"company_name": "_Test Company",
|
||||||
|
"abbr": "TC",
|
||||||
|
"default_currency": "INR",
|
||||||
|
"doctype": "Company"
|
||||||
|
}]
|
||||||
|
]
|
@ -20,3 +20,6 @@ import webnotes
|
|||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, d, dl):
|
def __init__(self, d, dl):
|
||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
|
|
||||||
|
# already set
|
||||||
|
test_records = []
|
Loading…
x
Reference in New Issue
Block a user