mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
108536490: Initial effort to implement log in
Add endpoint for post to /sign-in Initialise role data
This commit is contained in:
0
tests/app/main/views/__init__.py
Normal file
0
tests/app/main/views/__init__.py
Normal file
17
tests/app/main/views/test_sign_in.py
Normal file
17
tests/app/main/views/test_sign_in.py
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
def test_render_sign_in_returns_sign_in_template(notifications_admin):
|
||||
response = notifications_admin.test_client().get('/sign-in')
|
||||
assert response.status_code == 200
|
||||
assert 'Sign in' in response.get_data(as_text=True)
|
||||
assert 'Email address' in response.get_data(as_text=True)
|
||||
assert 'Password' in response.get_data(as_text=True)
|
||||
assert 'Forgotten password?' in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_process_sign_in_return_2fa_template(notifications_admin):
|
||||
response = notifications_admin.test_client().post('/sign-in',
|
||||
data={'email_address': 'valid@example.gov.uk',
|
||||
'password': 'val1dPassw0rd!'})
|
||||
assert response.status_code == 302
|
||||
assert response.location == 'http://localhost/two-factor'
|
||||
Reference in New Issue
Block a user