Reintroduce some tests. A bit of cleanup of mocks.

User object fields made a bit clearer and simple test to
verify user added.
This commit is contained in:
Adam Shimali
2016-01-23 23:14:50 +00:00
parent ba0d0d49e1
commit 4674bd6b68
23 changed files with 493 additions and 453 deletions

View File

@@ -4,12 +4,11 @@ from flask import url_for
def test_logged_in_user_redirects_to_choose_service(app_,
db_,
db_session,
mock_api_user,
mock_user_loader,
mock_user_dao_get_by_email):
mock_active_user,
mock_get_by_email):
with app_.test_request_context():
with app_.test_client() as client:
client.login(mock_api_user)
client.login(mock_active_user)
response = client.get(url_for('main.index'))
assert response.status_code == 302