source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/tests/functional/test_dummy.py @ 2484

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/tests/functional/test_dummy.py@2484
Revision 2484, 863 bytes checked in by spascoe, 13 years ago (diff)

Created a dummy controller for testing the ows parameter parsing
features. It works :-)

Line 
1"""
2DummyController is expected to implement dummy responses to the DummyOperation
3action.  It is used to test that OWS parameter parsing is working properly.
4
5@author: Stephen Pascoe
6"""
7
8from ows_server.tests import *
9
10class TestDummyController(TestController):
11    def test_index(self):
12        response = self.app.get(url_for(controller='dummy'))
13        # Expect exception report with MissingParameterValue exception
14        assert 'exceptionCode="MissingParameterValue"' in response
15        assert 'locator="request"' in response
16
17    def test_dummyOperation(self):
18        response = self.app.get(url_for(controller='dummy',
19                                        request='DummyOperation',
20                                        foo='foo', bar='bar'))
21        print response
22        assert 'foo=foo, bar=bar' in response
23                               
Note: See TracBrowser for help on using the repository browser.