added some test records

This commit is contained in:
Anand Doshi
2013-02-07 19:47:34 +05:30
parent c39d13b6a7
commit 6209046772
20 changed files with 210 additions and 68 deletions

View File

@@ -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 = [
[{
"doctype": "Brand",
"brand": "_Test Brand"
}]
]

View File

@@ -258,9 +258,9 @@ class DocType:
test_records = [
[{
"doctype": "Company",
"company_name": "_Test Company",
"abbr": "TC",
"abbr": "_TC",
"default_currency": "INR",
"doctype": "Company"
}]
}],
]

View File

@@ -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 = [
[{
"doctype": "Country",
"country_name": "_Test Country"
}]
]

View File

@@ -20,5 +20,3 @@ import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
test_records = []

View File

@@ -16,9 +16,6 @@
from __future__ import unicode_literals
import webnotes
from webnotes.model import db_exists
from webnotes.model.wrapper import copy_doclist
from webnotes import msgprint
sql = webnotes.conn.sql
@@ -63,4 +60,13 @@ class DocType(DocTypeNestedSet):
You can not trash/cancel/delete this customer group.", raise_exception=1)
# rebuild tree
super(DocType, self).on_trash()
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

@@ -67,4 +67,19 @@ class DocType(DocTypeNestedSet):
if self.doc.slideshow:
from website.helpers.slideshow import get_slideshow
get_slideshow(self)
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

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

View File

@@ -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 = [
[{
"doctype": "UOM",
"uom_name": "_Test UOM"
}]
]

View File

@@ -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 = [
[{
"doctype": "Warehouse Type",
"warehouse_type": "_Test Warehouse Type"
}]
]