fix: profitability test (#25812)
* fix: profitability test
* fix: replaced class method
* fix: removed print statement
diff --git a/erpnext/projects/report/project_profitability/test_project_profitability.py b/erpnext/projects/report/project_profitability/test_project_profitability.py
index f2b9c25..ea6bdb5 100644
--- a/erpnext/projects/report/project_profitability/test_project_profitability.py
+++ b/erpnext/projects/report/project_profitability/test_project_profitability.py
@@ -8,7 +8,7 @@
from erpnext.projects.report.project_profitability.project_profitability import execute
class TestProjectProfitability(unittest.TestCase):
- @classmethod
+
def setUp(self):
emp = make_employee('test_employee_9@salary.com', company='_Test Company')
if not frappe.db.exists('Salary Component', 'Timesheet Component'):
@@ -21,7 +21,7 @@
self.sales_invoice.due_date = nowdate()
self.sales_invoice.submit()
- frappe.db.set_value("HR Settings", "HR Settings", "standard_working_hours", 8)
+ frappe.db.set_value('HR Settings', None, 'standard_working_hours', 8)
def test_project_profitability(self):
filters = {
@@ -55,4 +55,4 @@
def tearDown(self):
frappe.get_doc("Sales Invoice", self.sales_invoice.name).cancel()
frappe.get_doc("Salary Slip", self.salary_slip.name).cancel()
- frappe.get_doc("Timesheet", self.timesheet.name).cancel()
\ No newline at end of file
+ frappe.get_doc("Timesheet", self.timesheet.name).cancel()