test: Add basic test for demo data
This commit is contained in:
parent
85e1c85b52
commit
490b64575b
@ -195,6 +195,17 @@ class TestCompany(unittest.TestCase):
|
|||||||
child_company.save()
|
child_company.save()
|
||||||
self.test_basic_tree()
|
self.test_basic_tree()
|
||||||
|
|
||||||
|
def test_demo_data(self):
|
||||||
|
from erpnext.setup.demo import clear_demo_data, setup_demo_data
|
||||||
|
|
||||||
|
setup_demo_data()
|
||||||
|
company_name = frappe.db.get_value("Company", {"name": ("like", "%(Demo)")})
|
||||||
|
self.assertTrue(company_name)
|
||||||
|
|
||||||
|
clear_demo_data()
|
||||||
|
company_name = frappe.db.get_value("Company", {"name": ("like", "%(Demo)")})
|
||||||
|
self.assertFalse(company_name)
|
||||||
|
|
||||||
|
|
||||||
def create_company_communication(doctype, docname):
|
def create_company_communication(doctype, docname):
|
||||||
comm = frappe.get_doc(
|
comm = frappe.get_doc(
|
||||||
|
Loading…
Reference in New Issue
Block a user