-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(External Contact): add unit test
- Loading branch information
1 parent
cb01abd
commit 5282a6a
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
14 changes: 10 additions & 4 deletions
14
landa/organization_management/doctype/external_contact/test_external_contact.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
# Copyright (c) 2022, Real Experts GmbH and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestExternalContact(unittest.TestCase): | ||
pass | ||
class TestExternalContact(FrappeTestCase): | ||
def test_autoname(self): | ||
contacts = frappe.get_all("External Contact", pluck="name") | ||
self.assertIn("EXT-REG-0001", contacts) | ||
self.assertIn("EXT-REG-0002", contacts) | ||
|
||
def test_full_name(self): | ||
self.assertTrue(frappe.db.exists("External Contact", {"full_name": "Jane Doe"})) |