Skip to content

Commit

Permalink
Create web2py.run() function to inject controller and function names …
Browse files Browse the repository at this point in the history
…into environment
  • Loading branch information
viniciusban committed Oct 30, 2013
1 parent 2fe2274 commit 27007c2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ def web2py(appname):
tests.
'''

def run(controller, function, env):
"""Injects request.controller and request.function into
web2py environment.
"""

from gluon.compileapp import run_controller_in

env.request.controller = controller
env.request.function = function
return run_controller_in(controller, function, env)


from gluon.shell import env
from gluon.storage import Storage

Expand Down

0 comments on commit 27007c2

Please sign in to comment.