add button 'execute booking now'
This commit is contained in:
parent
3ed2216cbf
commit
46eb9a8c23
6 changed files with 69 additions and 3 deletions
|
@ -388,6 +388,23 @@ class PlannerTestCase(object):
|
|||
'setpos': 5, 'monthday': None, 'weekday': '2',
|
||||
'end_date': None}])
|
||||
|
||||
@with_transaction()
|
||||
def test_planner_run_booking_now(self):
|
||||
""" create job, press button 'booknow'
|
||||
"""
|
||||
Planner = Pool().get('cashbook.planner')
|
||||
|
||||
job = self.prep_create_job()
|
||||
self.assertEqual(
|
||||
job.rec_name, "Job 1|Book 1|Exp|Cat1|05/01/2022|usd0.00")
|
||||
self.assertEqual(
|
||||
job._compute_dates_by_rrule(
|
||||
count=1, query_date=date(2022, 5, 1)), [
|
||||
date(2022, 5, 1)])
|
||||
Planner.booknow([job])
|
||||
self.assertEqual(
|
||||
job.rec_name, "Job 1|Book 1|Exp|Cat1|06/01/2022|usd0.00")
|
||||
|
||||
@with_transaction()
|
||||
def test_planner_create_update_nextrun(self):
|
||||
""" create job, check nextrun-record
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue