mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Update the jobs and activity page to show the user that created the job.
This commit is contained in:
@@ -16,6 +16,7 @@ class TestClient(FlaskClient):
|
||||
mocker.patch('app.user_api_client.get_user', return_value=user)
|
||||
mocker.patch('app.events_api_client.create_event')
|
||||
if mocker and service:
|
||||
session['service_id'] = service['id']
|
||||
mocker.patch('app.service_api_client.get_service', return_value={'data': service})
|
||||
login_user(user, remember=True)
|
||||
|
||||
@@ -115,6 +116,21 @@ def job_json():
|
||||
return data
|
||||
|
||||
|
||||
def job_json_with_created_by(service_id=None, job_id=None):
|
||||
data = {
|
||||
'id': job_id if job_id else str(generate_uuid()),
|
||||
'service': service_id if service_id else str(generate_uuid()),
|
||||
'template': 1,
|
||||
'original_file_name': 'thisisatest.csv',
|
||||
'created_at': str(datetime.datetime.now().time()),
|
||||
'notification_count': 1,
|
||||
'notifications_sent': 1,
|
||||
'status': '',
|
||||
'created_by': {'name': 'Test User'}
|
||||
}
|
||||
return data
|
||||
|
||||
|
||||
def notification_json(service_id,
|
||||
job=None,
|
||||
template=None,
|
||||
|
||||
Reference in New Issue
Block a user