mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
Merged
This commit is contained in:
@@ -30,6 +30,9 @@ def sign_in():
|
|||||||
return redirect(url_for('main.choose_service'))
|
return redirect(url_for('main.choose_service'))
|
||||||
|
|
||||||
form = LoginForm()
|
form = LoginForm()
|
||||||
|
if form.email_address.data:
|
||||||
|
form.email_address.data = form.email_address.data.strip()
|
||||||
|
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
|
|
||||||
user = user_api_client.get_user_by_email_or_none(form.email_address.data)
|
user = user_api_client.get_user_by_email_or_none(form.email_address.data)
|
||||||
|
|||||||
@@ -120,12 +120,12 @@
|
|||||||
<div class="grid-row bottom-gutter">
|
<div class="grid-row bottom-gutter">
|
||||||
<div class="column-half">
|
<div class="column-half">
|
||||||
<h3 class="visually-hidden">Services</h3>
|
<h3 class="visually-hidden">Services</h3>
|
||||||
<div class="product-page-big-number">117</div>
|
<div class="product-page-big-number">119</div>
|
||||||
services
|
services
|
||||||
</div>
|
</div>
|
||||||
<div class="column-half">
|
<div class="column-half">
|
||||||
<h3 class="visually-hidden">Organisations</h3>
|
<h3 class="visually-hidden">Organisations</h3>
|
||||||
<div class="product-page-big-number">50</div>
|
<div class="product-page-big-number">51</div>
|
||||||
organisations
|
organisations
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ boto3==1.4.8
|
|||||||
blinker==1.4
|
blinker==1.4
|
||||||
pyexcel==0.5.6
|
pyexcel==0.5.6
|
||||||
pyexcel-io==0.5.4
|
pyexcel-io==0.5.4
|
||||||
pyexcel-xls==0.5.4
|
pyexcel-xls==0.5.5
|
||||||
pyexcel-xlsx==0.5.4
|
pyexcel-xlsx==0.5.4
|
||||||
pyexcel-ods3==0.5.2
|
pyexcel-ods3==0.5.2
|
||||||
pytz==2017.3
|
pytz==2017.3
|
||||||
|
|||||||
@@ -77,6 +77,10 @@ def test_logged_in_user_redirects_to_choose_service(
|
|||||||
assert response.location == url_for('main.choose_service', _external=True)
|
assert response.location == url_for('main.choose_service', _external=True)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('email_address', [
|
||||||
|
'valid@example.gov.uk',
|
||||||
|
' valid@example.gov.uk ',
|
||||||
|
])
|
||||||
def test_process_sms_auth_sign_in_return_2fa_template(
|
def test_process_sms_auth_sign_in_return_2fa_template(
|
||||||
client,
|
client,
|
||||||
api_user_active,
|
api_user_active,
|
||||||
@@ -84,14 +88,16 @@ def test_process_sms_auth_sign_in_return_2fa_template(
|
|||||||
mock_get_user,
|
mock_get_user,
|
||||||
mock_get_user_by_email,
|
mock_get_user_by_email,
|
||||||
mock_verify_password,
|
mock_verify_password,
|
||||||
|
email_address,
|
||||||
):
|
):
|
||||||
response = client.post(
|
response = client.post(
|
||||||
url_for('main.sign_in'), data={
|
url_for('main.sign_in'), data={
|
||||||
'email_address': 'valid@example.gov.uk',
|
'email_address': email_address,
|
||||||
'password': 'val1dPassw0rd!'})
|
'password': 'val1dPassw0rd!'})
|
||||||
assert response.status_code == 302
|
assert response.status_code == 302
|
||||||
assert response.location == url_for('.two_factor', _external=True)
|
assert response.location == url_for('.two_factor', _external=True)
|
||||||
mock_verify_password.assert_called_with(api_user_active.id, 'val1dPassw0rd!')
|
mock_verify_password.assert_called_with(api_user_active.id, 'val1dPassw0rd!')
|
||||||
|
mock_get_user_by_email.assert_called_with('valid@example.gov.uk')
|
||||||
|
|
||||||
|
|
||||||
def test_process_email_auth_sign_in_return_2fa_template(
|
def test_process_email_auth_sign_in_return_2fa_template(
|
||||||
|
|||||||
Reference in New Issue
Block a user