[web2py] Test controller again

2011-01-27 Thread walter
Excuse me. May be I'm stupid, but I don't understand how to test next case. I want to test that a response.status really has 303. Bit of my code: def show(): if request.args(0) == None: redirect(URL('index')) How should I write a doctest for this?

[web2py] Test controller

2011-01-15 Thread walter
This is my code def index(): form = SQLFORM(db.article) if form.accepts(request.vars): response.flash = Статья добавлена articles = db().select(db.article.ALL) return dict(articles=articles, form=form) I can't understand how to test index? How to test articles value for example?