source: cows/trunk/cows/test/testapp/controllers/__init__.py @ 4613

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/test/testapp/controllers/__init__.py@4613
Revision 4613, 1010 bytes checked in by spascoe, 12 years ago (diff)

Improved testing for COWS.

To effectively test COWS you need a Pylons application. I've created a
mini pylons app in cows/test/testapp that is automatically wired into
the Pylons testing framework when you run "nosetests cows". See
cows/test/README.

Line 
1"""The base Controller API
2
3Provides the BaseController class for subclassing, and other objects
4utilized by Controllers.
5"""
6from pylons import c, cache, config, g, request, response, session
7from pylons.controllers import WSGIController
8from pylons.controllers.util import abort, etag_cache, redirect_to
9from pylons.decorators import jsonify, validate
10from pylons.i18n import _, ungettext, N_
11from pylons.templating import render
12
13import cows.test.testapp.helpers as h
14
15class BaseController(WSGIController):
16
17    def __call__(self, environ, start_response):
18        """Invoke the Controller"""
19        # WSGIController.__call__ dispatches to the Controller method
20        # the request is routed to. This routing information is
21        # available in environ['pylons.routes_dict']
22        return WSGIController.__call__(self, environ, start_response)
23
24# Include the '_' function in the public names
25__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
26           or __name == '_']
Note: See TracBrowser for help on using the repository browser.