mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 23:18:02 +00:00
refactor(test): hardcoded names over dynamic
This commit is contained in:
@@ -9,13 +9,18 @@ from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
class TestActivityCost(ERPNextTestSuite):
|
||||
def test_duplication(self):
|
||||
employee = frappe.db.get_all("Employee", filters={"first_name": "_Test Employee"})[0].name
|
||||
activity_type = frappe.db.get_all(
|
||||
"Activity Type", filters={"activity_type": "_Test Activity Type 1"}
|
||||
)[0].name
|
||||
|
||||
frappe.db.sql("delete from `tabActivity Cost`")
|
||||
activity_cost1 = frappe.new_doc("Activity Cost")
|
||||
activity_cost1.update(
|
||||
{
|
||||
"employee": "_Test Employee",
|
||||
"employee_name": self.employees[0].first_name,
|
||||
"activity_type": self.activity_type[1].name,
|
||||
"employee": employee,
|
||||
"employee_name": employee,
|
||||
"activity_type": activity_type,
|
||||
"billing_rate": 100,
|
||||
"costing_rate": 50,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user