Merge conflicts and test fixes

This commit is contained in:
Adam Shimali
2016-01-20 15:40:06 +00:00
parent ca3d3240a6
commit fcedae5fe1
3 changed files with 11 additions and 6 deletions

View File

@@ -9,7 +9,8 @@ def test_get_should_render_add_service_template(app_,
db_session,
active_user,
mock_get_service,
mock_get_services):
mock_get_services,
mock_user_loader):
with app_.test_request_context():
with app_.test_client() as client:
client.login(active_user)
@@ -22,7 +23,8 @@ def test_should_add_service_and_redirect_to_next_page(app_,
db_,
db_session,
mock_create_service,
mock_get_services):
mock_get_services,
mock_user_loader):
with app_.test_request_context():
with app_.test_client() as client:
user = User.query.first()
@@ -41,7 +43,8 @@ def test_should_return_form_errors_when_service_name_is_empty(app_,
db_session,
active_user,
mock_get_service,
mock_get_services):
mock_get_services,
mock_user_loader):
with app_.test_request_context():
with app_.test_client() as client:
client.login(active_user)
@@ -53,7 +56,8 @@ def test_should_return_form_errors_when_service_name_is_empty(app_,
def test_should_return_form_errors_with_duplicate_service_name(app_,
db_,
db_session,
mock_get_services):
mock_get_services,
mock_user_loader):
with app_.test_request_context():
with app_.test_client() as client:
user = User.query.first()

View File

@@ -4,7 +4,8 @@ from flask import url_for
def test_should_show_api_keys_and_documentation_page(app_,
db_,
db_session,
active_user):
active_user,
mock_user_loader):
with app_.test_request_context():
with app_.test_client() as client:
client.login(active_user)

View File

@@ -115,7 +115,7 @@ def test_should_update_mobile_number_resend_code(app_,
data={'mobile_number': '+447700900460'})
assert response.status_code == 302
assert response.location == url_for('main.verify', _external=True)
assert mock_api_user.mobile_number == '+44 7700 900 460'
assert mock_api_user.mobile_number == '+447700900460'
def test_should_render_verification_code_not_received(app_,