def test_empty_link_form(self): form = BookmarkForm(csrf_enabled=False) form.process() form.validate() assert 'url' in form.errors assert 'name' in form.errors
def test_link_form(self): form = BookmarkForm(csrf_enabled=False) form.process(name=u'example', url=u'http://www.example.com/') form.validate() assert form.errors == {}