mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Merge branch 'master' of https://github.com/alphagov/notifications-admin
This commit is contained in:
@@ -86,6 +86,7 @@ class Config(object):
|
||||
r"cjsm\.net",
|
||||
r"cqc\.org\.uk",
|
||||
r"bl\.uk",
|
||||
r"stfc\.ac\.uk",
|
||||
]
|
||||
|
||||
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-local'
|
||||
|
||||
@@ -36,7 +36,7 @@ class ValidGovEmail:
|
||||
def __call__(self, form, field):
|
||||
from flask import url_for
|
||||
message = (
|
||||
'Enter a central government email address.'
|
||||
'Enter a government email address.'
|
||||
' If you think you should have access'
|
||||
' <a href="{}">contact us</a>').format(url_for('main.support'))
|
||||
if not is_gov_user(field.data.lower()):
|
||||
|
||||
@@ -13,7 +13,7 @@ Create an account
|
||||
<h1 class="heading-large">Create an account</h1>
|
||||
<form method="post" novalidate>
|
||||
{{ textbox(form.name, width='3-4') }}
|
||||
{{ textbox(form.email_address, hint="Must be from a central government organisation", width='3-4', safe_error_message=True) }}
|
||||
{{ textbox(form.email_address, hint="Must be from a government organisation", width='3-4', safe_error_message=True) }}
|
||||
{{ textbox(form.mobile_number, width='3-4', hint='We’ll send you a security code by text message') }}
|
||||
<input class="visually-hidden" aria-hidden="true" tabindex="-1" id="defeat-chrome-autocomplete">
|
||||
{{ textbox(form.password, hint="At least 8 characters", width='3-4') }}
|
||||
|
||||
@@ -10,7 +10,7 @@ py-gfm==0.1.3
|
||||
blinker==1.4
|
||||
lxml==3.8.0
|
||||
pyexcel==0.5.3
|
||||
pyexcel-io==0.4.3
|
||||
pyexcel-io==0.4.4
|
||||
pyexcel-xls==0.4.0
|
||||
pyexcel-xlsx==0.4.1
|
||||
pyexcel-ods3==0.4.0
|
||||
|
||||
@@ -3,7 +3,7 @@ pycodestyle==2.3.1
|
||||
pytest==3.2.1
|
||||
pytest-mock==1.6.2
|
||||
pytest-cov==2.5.1
|
||||
pytest-xdist==1.19.0
|
||||
pytest-xdist==1.19.1
|
||||
coveralls==1.1
|
||||
moto==1.0.1
|
||||
httpretty==0.8.14
|
||||
|
||||
@@ -28,7 +28,7 @@ def test_valid_email_not_in_valid_domains(
|
||||
):
|
||||
form = RegisterUserForm(email_address="test@test.com", mobile_number='441231231231')
|
||||
assert not form.validate()
|
||||
assert "Enter a central government email address" in form.errors['email_address'][0]
|
||||
assert "Enter a government email address" in form.errors['email_address'][0]
|
||||
|
||||
|
||||
def test_valid_email_in_valid_domains(
|
||||
@@ -94,6 +94,7 @@ def _gen_mock_field(x):
|
||||
'test@cqc.org.uk',
|
||||
'test@digital.cqc.org.uk',
|
||||
'test@bl.uk',
|
||||
'test@stfc.ac.uk',
|
||||
])
|
||||
def test_valid_list_of_white_list_email_domains(
|
||||
client,
|
||||
|
||||
@@ -96,7 +96,7 @@ def test_should_return_200_when_email_is_not_gov_uk(
|
||||
'password': 'validPassword!'})
|
||||
|
||||
assert response.status_code == 200
|
||||
assert 'Enter a central government email address' in response.get_data(as_text=True)
|
||||
assert 'Enter a government email address' in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_should_add_user_details_to_session(
|
||||
|
||||
Reference in New Issue
Block a user