=================================================================================== test session starts ===================================================================================
platform linux2 -- Python 2.7.4 -- pytest-2.4.2 -- /home/noitulove/projets/web2py.test/bin/python
collected 11 items
applications/people/tests/controllers/test_people_controller_web2pyenv.py:15: test_index_exists PASSED
applications/people/tests/controllers/test_people_controller_web2pyenv.py:29: test_new_person_with_form PASSED
applications/people/tests/controllers/test_people_controller_web2pyenv.py:50: test_validate_new_person FAILED
======================================================================================== FAILURES =========================================================================================
________________________________________________________________________________ test_validate_new_person _________________________________________________________________________________
web2py = <Storage {'Service': <class 'gluon.tools.Service'>, 'OBJECT': <class 'gluon.ht...ytest/web2pytest.pyc'>, 'T': <gluon.languages.translator object at 0x333c450>}>
def test_validate_new_person(web2py):
'''Is the form validating?
'''
from gluon.compileapp import run_controller_in
data = dict(
name='',
phone='',
_formname='new_person_form',
)
web2py.request.post_vars.update(data)
result = run_controller_in('people', 'new_person', web2py)
> assert result['form'].errors
E assert <Storage {}>
E + where <Storage {}> = <gluon.sqlhtml.SQLFORM object at 0x335c650>.errors
applications/people/tests/controllers/test_people_controller_web2pyenv.py:65: AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================================================== 1 failed, 2 passed in 0.25 seconds ==========================================================================
I will start to study it.