functional test is not work in newest version, in old version work.
*error*
C:\web2py\applications\test\modules>python funcional_test.py
No handlers could be found for logger "web2py"
Changed session ID test
Traceback (most recent call last):
File "funcional_test.py", line 32, in <module>
assert('Homer' in client.text)
AssertionError
*code taken from the book*
import sys; sys.path.append('../../../')
from gluon.contrib.webclient import WebClient
client = WebClient('https://127.0.0.1/test/default/',
postbacks=True)
client.get('index')
# register
data = dict(first_name='Homer',
last_name='Simpson',
email='[email protected]',
password='test',
password_two='test',
_formname='register')
client.post('user/register', data=data)
print data
# logout
client.get('user/logout')
# login again
data = dict(email='[email protected]',
password='test',
_formname='login')
client.post('user/login', data=data)
print data
# check registration and login were successful
client.get('index')
#print client.text
#assert('Homer' in client.text)
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.