fix: couple of travis fixes (#24554)

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
Nabin Hait 2021-02-05 10:04:18 -08:00 committed by GitHub
parent 4742a25942
commit c4a1bb0e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -139,6 +139,7 @@ def create_inpatient(patient):
inpatient_record.phone = patient_obj.phone
inpatient_record.inpatient = "Scheduled"
inpatient_record.scheduled_date = today()
inpatient_record.company = "_Test Company"
return inpatient_record

View File

@ -16,11 +16,13 @@ class TestEmployee(unittest.TestCase):
employee = frappe.get_doc("Employee", frappe.db.sql_list("select name from tabEmployee limit 1")[0])
employee.date_of_birth = "1992" + frappe.utils.nowdate()[4:]
employee.company_email = "test@example.com"
employee.company = "_Test Company"
employee.save()
from erpnext.hr.doctype.employee.employee import get_employees_who_are_born_today, send_birthday_reminders
self.assertTrue(employee.name in [e.name for e in get_employees_who_are_born_today()])
employees_born_today = get_employees_who_are_born_today()
self.assertTrue(employees_born_today.get("_Test Company"))
frappe.db.sql("delete from `tabEmail Queue`")