add cronjob
This commit is contained in:
parent
132fcbb0d5
commit
9f3e33d225
11 changed files with 339 additions and 168 deletions
|
@ -207,4 +207,19 @@ class PlannerTestCase(object):
|
|||
'setpos': 5, 'monthday': None, 'weekday': '2',
|
||||
'end_date': None}])
|
||||
|
||||
@with_transaction()
|
||||
def test_planner_create_update_nextrun(self):
|
||||
""" create job, check nextrun-record
|
||||
"""
|
||||
Planner = Pool().get('cashbook.planner')
|
||||
|
||||
job = self.prep_create_job()
|
||||
self.assertEqual(
|
||||
job._compute_dates_by_rrule(
|
||||
count=1, start_date=date(2022, 5, 1)), [
|
||||
date(2022, 5, 1)])
|
||||
|
||||
job.update_next_occurence([job])
|
||||
self.assertEqual(len(job.nextrun), 1)
|
||||
|
||||
# end PlannerTestCase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue