mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
109638656: Initial implementation for two-factor
This commit is contained in:
14
tests/app/main/views/test_two_factor.py
Normal file
14
tests/app/main/views/test_two_factor.py
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
def test_should_render_two_factor_page(notifications_admin, notifications_admin_db):
|
||||
response = notifications_admin.test_client().get('/two-factor')
|
||||
assert response.status_code == 200
|
||||
assert '''We've sent you a text message with a verification code.''' in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_should_login_user_and_redirect_to_dashboard(notifications_admin, notifications_admin_db):
|
||||
response = notifications_admin.test_client().post('/two-factor',
|
||||
data={'sms_code': '12345'})
|
||||
|
||||
assert response.status_code == 302
|
||||
assert response.location == 'http://localhost/dashboard'
|
||||
Reference in New Issue
Block a user