test: fix shift type not found (#24929)
This commit is contained in:
parent
52bbd4e182
commit
500f54e515
@ -7,6 +7,8 @@ import frappe
|
||||
import unittest
|
||||
from frappe.utils import nowdate, add_days
|
||||
|
||||
test_dependencies = ["Shift Type"]
|
||||
|
||||
class TestShiftRequest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
for doctype in ["Shift Request", "Shift Assignment"]:
|
||||
@ -46,4 +48,4 @@ def set_shift_approver(department):
|
||||
department_doc = frappe.get_doc("Department", department)
|
||||
department_doc.append('shift_request_approver',{'approver': "test1@example.com"})
|
||||
department_doc.save()
|
||||
department_doc.reload()
|
||||
department_doc.reload()
|
||||
|
8
erpnext/hr/doctype/shift_type/test_records.json
Normal file
8
erpnext/hr/doctype/shift_type/test_records.json
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Shift Type",
|
||||
"name": "Day Shift",
|
||||
"start_time": "9:00:00",
|
||||
"end_time": "18:00:00"
|
||||
}
|
||||
]
|
@ -7,14 +7,4 @@ import frappe
|
||||
import unittest
|
||||
|
||||
class TestShiftType(unittest.TestCase):
|
||||
def test_make_shift_type(self):
|
||||
if frappe.db.exists("Shift Type", "Day Shift"):
|
||||
return
|
||||
shift_type = frappe.get_doc({
|
||||
"doctype": "Shift Type",
|
||||
"name": "Day Shift",
|
||||
"start_time": "9:00:00",
|
||||
"end_time": "18:00:00"
|
||||
})
|
||||
shift_type.insert()
|
||||
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user