mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-02 13:08:27 +00:00
upgraded test_runner, now can run multiple tests
This commit is contained in:
@@ -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"
|
||||
}]
|
||||
]
|
||||
6
setup/doctype/brand/test_brand.py
Normal file
6
setup/doctype/brand/test_brand.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Brand",
|
||||
"brand": "_Test Brand"
|
||||
}]
|
||||
]
|
||||
@@ -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)
|
||||
10
setup/doctype/company/test_company.py
Normal file
10
setup/doctype/company/test_company.py
Normal file
@@ -0,0 +1,10 @@
|
||||
test_ignore = ["Account"]
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Company",
|
||||
"company_name": "_Test Company",
|
||||
"abbr": "_TC",
|
||||
"default_currency": "INR",
|
||||
}],
|
||||
]
|
||||
@@ -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"
|
||||
}]
|
||||
]
|
||||
6
setup/doctype/country/test_country.py
Normal file
6
setup/doctype/country/test_country.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Country",
|
||||
"country_name": "_Test Country"
|
||||
}]
|
||||
]
|
||||
2
setup/doctype/currency/test_currency.py
Normal file
2
setup/doctype/currency/test_currency.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# pre loaded
|
||||
test_records = []
|
||||
@@ -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"
|
||||
}]
|
||||
]
|
||||
8
setup/doctype/customer_group/test_customer_group.py
Normal file
8
setup/doctype/customer_group/test_customer_group.py
Normal 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"
|
||||
}]
|
||||
]
|
||||
@@ -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"
|
||||
}],
|
||||
]
|
||||
14
setup/doctype/item_group/test_item_group.py
Normal file
14
setup/doctype/item_group/test_item_group.py
Normal 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"
|
||||
}],
|
||||
]
|
||||
6
setup/doctype/price_list/test_price_list.py
Normal file
6
setup/doctype/price_list/test_price_list.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Price List",
|
||||
"price_list_name": "_Test Price List"
|
||||
}]
|
||||
]
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
test_records = [[{"doctype":"Quotation Lost Reason", "order_lost_reason": "_Test Quotation Lost Reason"}]]
|
||||
1
setup/doctype/sales_partner/test_sales_partner.py
Normal file
1
setup/doctype/sales_partner/test_sales_partner.py
Normal file
@@ -0,0 +1 @@
|
||||
test_records = []
|
||||
8
setup/doctype/sales_person/test_sales_person.py
Normal file
8
setup/doctype/sales_person/test_sales_person.py
Normal 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"
|
||||
}]
|
||||
]
|
||||
@@ -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",
|
||||
}]
|
||||
]
|
||||
6
setup/doctype/supplier_type/test_supplier_type.py
Normal file
6
setup/doctype/supplier_type/test_supplier_type.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Supplier Type",
|
||||
"supplier_type": "_Test Supplier Type",
|
||||
}]
|
||||
]
|
||||
@@ -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",
|
||||
}]
|
||||
]
|
||||
|
||||
8
setup/doctype/territory/test_territory.py
Normal file
8
setup/doctype/territory/test_territory.py
Normal file
@@ -0,0 +1,8 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Territory",
|
||||
"territory_name": "_Test Territory",
|
||||
"parent_territory": "All Territories",
|
||||
"is_group": "No",
|
||||
}]
|
||||
]
|
||||
6
setup/doctype/uom/test_uom.py
Normal file
6
setup/doctype/uom/test_uom.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "UOM",
|
||||
"uom_name": "_Test UOM"
|
||||
}]
|
||||
]
|
||||
@@ -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"
|
||||
}]
|
||||
]
|
||||
6
setup/doctype/warehouse_type/test_warehouse_type.py
Normal file
6
setup/doctype/warehouse_type/test_warehouse_type.py
Normal file
@@ -0,0 +1,6 @@
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Warehouse Type",
|
||||
"warehouse_type": "_Test Warehouse Type"
|
||||
}]
|
||||
]
|
||||
@@ -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"
|
||||
}]
|
||||
]
|
||||
Reference in New Issue
Block a user