Tests added for dao.

This commit is contained in:
Nicholas Staples
2016-01-15 15:15:35 +00:00
parent d42ee85f93
commit 3b1d521c10
39 changed files with 769 additions and 652 deletions

View File

@@ -2,10 +2,10 @@ from app.main.forms import AddServiceForm
from werkzeug.datastructures import MultiDict
def test_form_should_have_errors_when_duplicate_service_is_added(notifications_admin,
notifications_admin_db,
notify_db_session):
with notifications_admin.test_request_context():
def test_form_should_have_errors_when_duplicate_service_is_added(app_,
db_,
db_session):
with app_.test_request_context():
form = AddServiceForm(['some service', 'more names'],
formdata=MultiDict([('service_name', 'some service')]))
form.validate()