Merge pull request #264 from alphagov/fix-sign-in-tests

Fix to sign in test and user model
This commit is contained in:
Rebecca Law
2016-03-11 14:59:49 +00:00
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(