示例#1
0
	def test_load(self):
		getdoctype("DocType")
		meta = filter(lambda d: d.name=="DocType", frappe.response.docs)[0]
		self.assertEquals(meta.name, "DocType")
		self.assertTrue(meta.get("__js"))

		frappe.response.docs = []
		getdoctype("Event")
		meta = filter(lambda d: d.name=="Event", frappe.response.docs)[0]
		self.assertTrue(meta.get("__calendar_js"))
示例#2
0
	def test_load(self):
		getdoctype("DocType")
		meta = list(filter(lambda d: d.name=="DocType", frappe.response.docs))[0]
		self.assertEqual(meta.name, "DocType")
		self.assertTrue(meta.get("__js"))

		frappe.response.docs = []
		getdoctype("Event")
		meta = list(filter(lambda d: d.name=="Event", frappe.response.docs))[0]
		self.assertTrue(meta.get("__calendar_js"))
示例#3
0
def test_doctype():
    print getdoctype(doctype="Purchase Order", with_parent = 1)