upgraded test_runner, now can run multiple tests

This commit is contained in:
Rushabh Mehta
2013-02-12 19:20:39 +05:30
parent 9a8319dd0b
commit 4b9827a5fc
75 changed files with 508 additions and 662 deletions

View File

@@ -20,10 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = [
[{
"doctype": "Brand",
"brand": "_Test Brand"
}]
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "Brand",
"brand": "_Test Brand"
}]
]

View File

@@ -254,13 +254,4 @@ class DocType:
sql("update `tabCompany` set company_name = '%s' where name = '%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:
set_default('company', newdn)
test_records = [
[{
"doctype": "Company",
"company_name": "_Test Company",
"abbr": "_TC",
"default_currency": "INR",
}],
]
set_default('company', newdn)

View File

@@ -0,0 +1,10 @@
test_ignore = ["Account"]
test_records = [
[{
"doctype": "Company",
"company_name": "_Test Company",
"abbr": "_TC",
"default_currency": "INR",
}],
]

View File

@@ -20,10 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = [
[{
"doctype": "Country",
"country_name": "_Test Country"
}]
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "Country",
"country_name": "_Test Country"
}]
]

View File

@@ -0,0 +1,2 @@
# pre loaded
test_records = []

View File

@@ -61,12 +61,3 @@ class DocType(DocTypeNestedSet):
# rebuild tree
super(DocType, self).on_trash()
test_records = [
[{
"doctype": "Customer Group",
"customer_group_name": "_Test Customer Group",
"parent_customer_group": "All Customer Groups",
"is_group": "No"
}]
]

View File

@@ -0,0 +1,8 @@
test_records = [
[{
"doctype": "Customer Group",
"customer_group_name": "_Test Customer Group",
"parent_customer_group": "All Customer Groups",
"is_group": "No"
}]
]

View File

@@ -68,18 +68,3 @@ class DocType(DocTypeNestedSet):
if self.doc.slideshow:
from website.helpers.slideshow import get_slideshow
get_slideshow(self)
test_records = [
[{
"doctype": "Item Group",
"item_group_name": "_Test Item Group",
"parent_item_group": "All Item Groups",
"is_group": "No"
}],
[{
"doctype": "Item Group",
"item_group_name": "_Test Item Group Desktops",
"parent_item_group": "All Item Groups",
"is_group": "No"
}],
]

View File

@@ -0,0 +1,14 @@
test_records = [
[{
"doctype": "Item Group",
"item_group_name": "_Test Item Group",
"parent_item_group": "All Item Groups",
"is_group": "No"
}],
[{
"doctype": "Item Group",
"item_group_name": "_Test Item Group Desktops",
"parent_item_group": "All Item Groups",
"is_group": "No"
}],
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "Price List",
"price_list_name": "_Test Price List"
}]
]

View File

@@ -19,4 +19,4 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
self.doc, self.doclist = d, dl

View File

@@ -0,0 +1 @@
test_records = [[{"doctype":"Quotation Lost Reason", "order_lost_reason": "_Test Quotation Lost Reason"}]]

View File

@@ -0,0 +1 @@
test_records = []

View File

@@ -0,0 +1,8 @@
test_records = [
[{
"doctype": "Sales Person",
"sales_person_name": "_Test Sales Person",
"parent_sales_person": "All Sales Persons",
"is_group": "No"
}]
]

View File

@@ -20,11 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = [
[{
"doctype": "Supplier Type",
"supplier_type": "_Test Supplier Type",
}]
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "Supplier Type",
"supplier_type": "_Test Supplier Type",
}]
]

View File

@@ -33,12 +33,4 @@ class DocType(DocTypeNestedSet):
if not flt(d.target_qty) and not flt(d.target_amount):
msgprint("Either target qty or target amount is mandatory.")
raise Exception
test_records = [
[{
"doctype": "Territory",
"territory_name": "_Test Territory",
"parent_territory": "All Territories",
"is_group": "No",
}]
]

View File

@@ -0,0 +1,8 @@
test_records = [
[{
"doctype": "Territory",
"territory_name": "_Test Territory",
"parent_territory": "All Territories",
"is_group": "No",
}]
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "UOM",
"uom_name": "_Test UOM"
}]
]

View File

@@ -20,10 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = [
[{
"doctype": "UOM",
"uom_name": "_Test UOM"
}]
]

View File

@@ -0,0 +1,6 @@
test_records = [
[{
"doctype": "Warehouse Type",
"warehouse_type": "_Test Warehouse Type"
}]
]

View File

@@ -20,10 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = [
[{
"doctype": "Warehouse Type",
"warehouse_type": "_Test Warehouse Type"
}]
]