source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/tests/functional/testBase.py @ 4182

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/tests/functional/testBase.py@4182
Revision 4182, 626 bytes checked in by cbyrom, 12 years ago (diff)

Extend controller level test suite.

Line 
1from unittest import TestCase
2from paste.registry import Registry
3import pylons
4from pylons.util import ContextObj
5from pylons.wsgiapp import WSGIRequest
6
7#from pylons.controllers.util import Request
8
9class testBase(TestCase):
10    """A basic test case which allows access to pylons.c and pylons.request.
11    """
12
13    def setUp(self):
14        self.registry=Registry()
15        self.registry.prepare()
16
17        self.context_obj=ContextObj()
18        self.registry.register(pylons.c, self.context_obj)
19
20        self.request_obj=WSGIRequest(dict(HTTP_HOST="nohost"))
21        self.registry.register(pylons.request, self.request_obj) 
Note: See TracBrowser for help on using the repository browser.