From dc7afa743c20505883df39f3aa7a151a58ef498f Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Mon, 24 May 2021 17:33:48 +0530 Subject: [PATCH] fix: profitability test (#25812) * fix: profitability test * fix: replaced class method * fix: removed print statement --- .../project_profitability/test_project_profitability.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/projects/report/project_profitability/test_project_profitability.py b/erpnext/projects/report/project_profitability/test_project_profitability.py index f2b9c2509a..ea6bdb54ca 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.doctype.timesheet.timesheet import make_salary_slip, make_ 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 @@ class TestProjectProfitability(unittest.TestCase): 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 @@ class TestProjectProfitability(unittest.TestCase): 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()