Put data from job on job page

The main change is showing the finished time if the job is finished, rather
than the start time.
This commit is contained in:
Chris Hill-Scott
2016-03-02 16:15:15 +00:00
parent 3a3e4258ef
commit d9073862fa
6 changed files with 77 additions and 31 deletions

View File

@@ -10,6 +10,7 @@ from . import (
template_json,
api_key_json,
job_json,
notification_json,
invite_json
)
from app.notify_client.models import (
@@ -541,6 +542,16 @@ def mock_get_jobs(mocker):
return mocker.patch('app.job_api_client.get_job', side_effect=_get_jobs)
@pytest.fixture(scope='function')
def mock_get_notifications(mocker):
def _get_notifications(service_id, job_id):
return notification_json()
return mocker.patch(
'app.notification_api_client.get_notifications_for_service',
side_effect=_get_notifications
)
@pytest.fixture(scope='function')
def mock_has_permissions(mocker):
def _has_permission(permissions, service_id=None, or_=False):