File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,14 +223,20 @@ def test_get_contracts_singleton(self):
223223 len (contracts ), 1 , "There is one open contract for the employee"
224224 )
225225
226- self .sally .contract_id .date_end = (Date .today () - timedelta (days = 1 )).strftime (
227- "%Y-%m-%d"
226+ first_contract = self .sally .contract_id
227+ end_date = first_contract .date_start
228+ first_contract .write (
229+ {
230+ "date_end" : end_date .strftime ("%Y-%m-%d" ),
231+ "state" : "close" ,
232+ }
228233 )
234+ second_start = end_date + timedelta (days = 1 )
229235 self .Contract .create (
230236 {
231237 "name" : "Second contract for Sally" ,
232238 "employee_id" : self .sally .id ,
233- "date_start" : Date . today () .strftime ("%Y-%m-%d" ),
239+ "date_start" : second_start .strftime ("%Y-%m-%d" ),
234240 "struct_id" : self .sales_pay_structure .id ,
235241 "wage" : 6500.00 ,
236242 "state" : "open" ,
You can’t perform that action at this time.
0 commit comments