seitime-frappe/frappe/tests/test_form_load.py
Anand Doshi f6cdd4a655 Merge remote-tracking branch 'frappe/develop' into v5.0
Conflicts:
	frappe/__version__.py
	frappe/core/doctype/communication/communication.py
	frappe/core/page/desktop/desktop.js
	frappe/hooks.py
	frappe/translations/ar.csv
	frappe/translations/es.csv
	frappe/translations/fr.csv
	frappe/translations/hr.csv
	frappe/translations/id.csv
	frappe/translations/ja.csv
	frappe/translations/nl.csv
	frappe/translations/pl.csv
	frappe/translations/pt-BR.csv
	frappe/translations/ru.csv
	frappe/translations/tr.csv
	frappe/translations/zh-cn.csv
	frappe/translations/zh-tw.csv
	frappe/utils/email_lib/html2text.py
	setup.py
2015-02-24 18:06:16 +05:30

19 lines
667 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, unittest
from frappe.desk.form.meta import get_meta
from frappe.desk.form.load import getdoctype, getdoc
class TestFormLoad(unittest.TestCase):
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 = []
d = getdoctype("Event")
meta = filter(lambda d: d.name=="Event", frappe.response.docs)[0]
self.assertTrue(meta.get("__calendar_js"))