mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
upgraded test_runner, now can run multiple tests
This commit is contained in:
@@ -19,4 +19,5 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
4
selling/doctype/campaign/test_campaign.py
Normal file
4
selling/doctype/campaign/test_campaign.py
Normal file
@@ -0,0 +1,4 @@
|
||||
test_records = [
|
||||
[{"doctype":"Campaign", "campaign_name":"_Test Campaign"}],
|
||||
[{"doctype":"Campaign", "campaign_name":"_Test Campaign 1"}],
|
||||
]
|
||||
@@ -248,15 +248,4 @@ class DocType(TransactionBase):
|
||||
|
||||
#update master_name in doctype account
|
||||
webnotes.conn.sql("""update `tabAccount` set master_name = %s,
|
||||
master_type = 'Customer' where master_name = %s""", (new,old))
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Customer",
|
||||
"customer_name": "_Test Customer",
|
||||
"customer_type": "Individual",
|
||||
"customer_group": "_Test Customer Group",
|
||||
"territory": "_Test Territory",
|
||||
"company": "_Test Company"
|
||||
}]
|
||||
]
|
||||
master_type = 'Customer' where master_name = %s""", (new,old))
|
||||
10
selling/doctype/customer/test_customer.py
Normal file
10
selling/doctype/customer/test_customer.py
Normal file
@@ -0,0 +1,10 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Customer",
|
||||
"customer_name": "_Test Customer",
|
||||
"customer_type": "Individual",
|
||||
"customer_group": "_Test Customer Group",
|
||||
"territory": "_Test Territory",
|
||||
"company": "_Test Company"
|
||||
}]
|
||||
]
|
||||
@@ -19,4 +19,5 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
4
selling/doctype/industry_type/test_industry_type.py
Normal file
4
selling/doctype/industry_type/test_industry_type.py
Normal file
@@ -0,0 +1,4 @@
|
||||
test_records = [
|
||||
[{"doctype":"Industry Type", "industry":"_Test Industry"}],
|
||||
[{"doctype":"Industry Type", "industry":"_Test Industry 1"}],
|
||||
]
|
||||
@@ -100,4 +100,4 @@ class DocType(SellingController):
|
||||
webnotes.conn.sql("""delete from tabCommunication where lead=%s""",
|
||||
self.doc.name)
|
||||
webnotes.conn.sql("""update `tabSupport Ticket` set lead='' where lead=%s""",
|
||||
self.doc.name)
|
||||
self.doc.name)
|
||||
|
||||
10
selling/doctype/lead/test_lead.py
Normal file
10
selling/doctype/lead/test_lead.py
Normal file
@@ -0,0 +1,10 @@
|
||||
test_records = [
|
||||
[{"doctype":"Lead", "lead_name": "_Test Lead", "status":"Open",
|
||||
"email_id":"test_lead@example.com"}],
|
||||
[{"doctype":"Lead", "lead_name": "_Test Lead 1", "status":"Open",
|
||||
"email_id":"test_lead1@example.com"}],
|
||||
[{"doctype":"Lead", "lead_name": "_Test Lead 2", "status":"Contacted",
|
||||
"email_id":"test_lead2@example.com"}],
|
||||
[{"doctype":"Lead", "lead_name": "_Test Lead 3", "status":"Converted",
|
||||
"email_id":"test_lead3@example.com"}],
|
||||
]
|
||||
Reference in New Issue
Block a user