From c1e3895fa0045a2d04acce1cfd75077f4ae84e1e Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 8 Aug 2019 08:29:55 +0200 Subject: [PATCH] Use create_employee from company tests issue8549 review281941002 --- tests/test_timesheet_cost.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_timesheet_cost.py b/tests/test_timesheet_cost.py index 2912a0e77c..6bf4b65092 100644 --- a/tests/test_timesheet_cost.py +++ b/tests/test_timesheet_cost.py @@ -8,7 +8,8 @@ import trytond.tests.test_tryton from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.pool import Pool -from trytond.modules.company.tests import create_company, set_company +from trytond.modules.company.tests import ( + create_company, set_company, create_employee) class TimesheetCostTestCase(ModuleTestCase): @@ -20,7 +21,6 @@ class TimesheetCostTestCase(ModuleTestCase): 'Test compute_cost_price' pool = Pool() Party = pool.get('party.party') - Employee = pool.get('company.employee') EmployeeCostPrice = pool.get('company.employee_cost_price') cost_prices = [ @@ -41,8 +41,7 @@ class TimesheetCostTestCase(ModuleTestCase): party.save() company = create_company() with set_company(company): - employee = Employee(party=party.id, company=company) - employee.save() + employee = create_employee(company) for date, cost_price in cost_prices: EmployeeCostPrice( employee=employee,