mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Setup code for tests for scheduled jobs.
This commit is contained in:
@@ -248,7 +248,9 @@ def sample_job(notify_db,
|
|||||||
service=None,
|
service=None,
|
||||||
template=None,
|
template=None,
|
||||||
notification_count=1,
|
notification_count=1,
|
||||||
created_at=datetime.utcnow()):
|
created_at=datetime.utcnow(),
|
||||||
|
job_status='pending',
|
||||||
|
scheduled_for=None):
|
||||||
if service is None:
|
if service is None:
|
||||||
service = sample_service(notify_db, notify_db_session)
|
service = sample_service(notify_db, notify_db_session)
|
||||||
if template is None:
|
if template is None:
|
||||||
@@ -263,7 +265,9 @@ def sample_job(notify_db,
|
|||||||
'original_file_name': 'some.csv',
|
'original_file_name': 'some.csv',
|
||||||
'notification_count': notification_count,
|
'notification_count': notification_count,
|
||||||
'created_at': created_at,
|
'created_at': created_at,
|
||||||
'created_by': service.created_by
|
'created_by': service.created_by,
|
||||||
|
'job_status': job_status,
|
||||||
|
'scheduled_for': scheduled_for
|
||||||
}
|
}
|
||||||
job = Job(**data)
|
job = Job(**data)
|
||||||
dao_create_job(job)
|
dao_create_job(job)
|
||||||
|
|||||||
Reference in New Issue
Block a user