fix: profitability test (#25812)
* fix: profitability test * fix: replaced class method * fix: removed print statement
This commit is contained in:
parent
6809ff4f64
commit
dc7afa743c
@ -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
|
from erpnext.projects.report.project_profitability.project_profitability import execute
|
||||||
|
|
||||||
class TestProjectProfitability(unittest.TestCase):
|
class TestProjectProfitability(unittest.TestCase):
|
||||||
@classmethod
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
emp = make_employee('test_employee_9@salary.com', company='_Test Company')
|
emp = make_employee('test_employee_9@salary.com', company='_Test Company')
|
||||||
if not frappe.db.exists('Salary Component', 'Timesheet Component'):
|
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.due_date = nowdate()
|
||||||
self.sales_invoice.submit()
|
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):
|
def test_project_profitability(self):
|
||||||
filters = {
|
filters = {
|
||||||
@ -55,4 +55,4 @@ class TestProjectProfitability(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
frappe.get_doc("Sales Invoice", self.sales_invoice.name).cancel()
|
frappe.get_doc("Sales Invoice", self.sales_invoice.name).cancel()
|
||||||
frappe.get_doc("Salary Slip", self.salary_slip.name).cancel()
|
frappe.get_doc("Salary Slip", self.salary_slip.name).cancel()
|
||||||
frappe.get_doc("Timesheet", self.timesheet.name).cancel()
|
frappe.get_doc("Timesheet", self.timesheet.name).cancel()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user