Work in progress, all tests passing and implemented mocks for services_dao.

This commit is contained in:
Nicholas Staples
2016-01-15 17:46:09 +00:00
parent 262bbbac45
commit 4e2019c949
40 changed files with 189 additions and 164 deletions

View File

@@ -1,15 +1,16 @@
from tests.app.main import create_test_user
from app.models import User
from flask import url_for
def test_should_show_recent_jobs_on_dashboard(app_,
db_,
db_session):
db_session,
active_user,
mock_get_service):
with app_.test_request_context():
with app_.test_client() as client:
user = create_test_user('active')
client.login(user)
response = client.get('/services/123/dashboard')
client.login(active_user)
response = client.get(url_for('main.service_dashboard', service_id=123))
assert response.status_code == 200
assert 'Test message 1' in response.get_data(as_text=True)