source: TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/__init__.py @ 6574

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/__init__.py@6574
Revision 6574, 1.3 KB checked in by pjkersha, 10 years ago (diff)

Changes for addition of AuthzDecisionQuery? WSGI interface (Authorisation service)

Line 
1"""Test SAML Attribute Query Interface
2
3NERC DataGrid Project
4"""
5__author__ = "P J Kershaw"
6__date__ = "21/08/09"
7__copyright__ = "(C) 2009 Science and Technology Facilities Council"
8__license__ = "BSD - see LICENSE file in top-level directory"
9__contact__ = "Philip.Kershaw@stfc.ac.uk"
10__revision__ = '$Id: $'
11import unittest
12import os
13import paste.fixture
14from paste.deploy import loadapp
15
16
17class TestApp(object):
18    def __init__(self, global_conf, **app_conf):
19        pass
20   
21    def __call__(self, environ, start_response):
22        response = "404 Not Found"
23        start_response(response,
24                       [('Content-length', str(len(response))),
25                        ('Content-type', 'text/plain')])
26                           
27        return [response]
28
29
30class SOAPAttributeInterfaceMiddlewareTestCase(unittest.TestCase):
31    HERE_DIR = os.path.dirname(os.path.abspath(__file__))
32    CONFIG_FILENAME = 'test.ini'
33   
34    def __init__(self, *args, **kwargs):
35        wsgiapp = loadapp(
36            'config:%s' % \
37                SOAPAttributeInterfaceMiddlewareTestCase.CONFIG_FILENAME, 
38            relative_to=SOAPAttributeInterfaceMiddlewareTestCase.HERE_DIR)
39       
40        self.app = paste.fixture.TestApp(wsgiapp)
41         
42        unittest.TestCase.__init__(self, *args, **kwargs)
Note: See TracBrowser for help on using the repository browser.