Good job!

I am still having problem with unit testing forms. It seems that I
cannot do a post.

        # Set variables for the test function
        request.env.request_method = 'POST'
        request.post_vars["body"] = "body"
        #request.vars = Storage(body = "bodyyyy")

        resp = index()
        print "vars", resp['form']

        #self.assertTrue(resp['form'].errors) # do we have errors?
        #self.assertTrue(resp['form'].errors.has_key('name')) # is
something missing?

Any ideas?

On Feb 25, 11:15 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
> I'm really glad to see this work happening, and I look forward to the slice.
>
> Perhaps we could eventually haveunittests as part of the welcome app, or 
> indeed all three standard apps, both for documentation purposes and to set a 
> good example.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to