Hi everyone,
I have a problem here seeking assistance. I am confused about how to
start writing test codes in web2py. Say I want to test the following:
def input_SS():
if session.username == None:
redirect(URL(r=request, f='../account/log_in'))
form = FORM(
TABLE(
TR('Data: ', TEXTAREA(_name='data',
value='Enter the data, separated by commas')),
INPUT(_type='submit', _value='SUBMIT')))
if form.accepts(request.vars,session):
session.data = [float(x) for x in form.vars.data.split(',')]
redirect(URL(r=request, f='analyze_SS'))
return dict(form=form)
The data is analyzed by 'analyze_SS' function.
How should I write my tests?
Thanks in advance.
Maurice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---