There are some doctests at the bottom of gluon/sqlhtml.py you may be able to find some examples there.
On Nov 9, 1:25 am, Ahmed Soliman <ah...@farghal.com> wrote: > Yes, I would like to hear the answer of that too, what if I want to > prepare a SQLFORM variables to be passed during doctest, how can > possible this happen as we don't know the key that is generated during > form creation? > > On Oct 28, 10:44 am, Hamadaaway <hamadaa...@gmail.com> wrote: > > > Supposing I've a method like : > > > def test(): > > ''' > > This is a docstring. The following 3 lines are adoctest: > > >>> request.vars.name='Max' > > >>> contactForm1 = SQLFORM(db.demo) > > >>> test() > > {'name': 'Max' ,'contactForm':contactForm1} > > ''' > > contactForm = SQLFORM(db.demo) > > return dict(contactForm=contactForm,name=request.vars.name) > > > how can I test the SQLFORM usingdoctest, since the previous code > > fails in testing? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---