Noticed that the api was being called when running the unit tests.

This also lead me to find the the failed_login_in count was always returning 0.
This commit is contained in:
Rebecca Law
2016-03-11 11:47:21 +00:00
parent f81dccc513
commit 58c748e703
3 changed files with 2 additions and 19 deletions

View File

@@ -58,18 +58,6 @@ def test_should_return_locked_out_true_when_user_is_locked(app_,
assert 'Username or password is incorrect' in resp.get_data(as_text=True)
def test_should_return_active_user_is_false_if_user_is_inactive(app_, mock_get_user_by_email_inactive):
with app_.test_request_context():
response = app_.test_client().post(
url_for('main.sign_in'), data={
'email_address': 'inactive_user@example.gov.uk',
'password': 'val1dPassw0rd!'})
assert response.status_code == 200
assert 'Username or password is incorrect' in response.get_data(as_text=True)
def test_should_return_200_when_user_does_not_exist(app_, mock_get_user_by_email_not_found):
with app_.test_request_context():
response = app_.test_client().post(