source: TI12-security/trunk/NDGSecurity/python/Tests/openidaxtest/openidaxtest/tests/__init__.py @ 6440

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/NDGSecurity/python/Tests/openidaxtest/openidaxtest/tests/__init__.py@6440
Revision 6440, 1.1 KB checked in by pjkersha, 11 years ago (diff)
  • #1088 Important fix to AuthnRedirectResponseMiddleware? to set redirect ONLY when SSL client authentication has just succeeded in the upstream middleware AuthKitSSLAuthnMiddleware. This bug was causing the browser to redirect to the wrong place following OpenID sign in in the case where the user is already logged into their provider and selects a new relying party to sign into.
    • Improvements to Provider decide page interface: leave out messages about attributes that the provider can't retrieve for the RP. Also included NDG style help icon.
Line 
1"""Pylons application test package
2
3This package assumes the Pylons environment is already loaded, such as
4when this script is imported from the `nosetests --with-pylons=test.ini`
5command.
6
7This module initializes the application via ``websetup`` (`paster
8setup-app`) and provides the base testing objects.
9"""
10from unittest import TestCase
11
12from paste.deploy import loadapp
13from paste.script.appinstall import SetupCommand
14from pylons import config, url
15from routes.util import URLGenerator
16from webtest import TestApp
17
18import pylons.test
19
20__all__ = ['environ', 'url', 'TestController']
21
22# Invoke websetup with the current config file
23SetupCommand('setup-app').run([config['__file__']])
24
25environ = {}
26
27class TestController(TestCase):
28
29    def __init__(self, *args, **kwargs):
30        if pylons.test.pylonsapp:
31            wsgiapp = pylons.test.pylonsapp
32        else:
33            wsgiapp = loadapp('config:%s' % config['__file__'])
34        self.app = TestApp(wsgiapp)
35        url._push_object(URLGenerator(config['routes.map'], environ))
36        TestCase.__init__(self, *args, **kwargs)
Note: See TracBrowser for help on using the repository browser.