Refactor add-service form such that the dao is not exposed in the forms.

This commit is contained in:
Rebecca Law
2016-01-04 15:31:50 +00:00
parent 75bafd7a7d
commit ac05f6931e
9 changed files with 57 additions and 35 deletions

View File

@@ -38,5 +38,5 @@ def test_should_return_form_errors_when_service_name_is_empty(notifications_admi
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
client.post('/two-factor', data={'sms_code': '12345'})
response = client.post('/add-service', data={})
assert response.status_code == 400
assert response.status_code == 200
assert 'Please enter your service name' in response.get_data(as_text=True)