source: TI12-security/trunk/python/ndg_security_test/ndg/security/test/unit/myproxy/certificate_extapp/test_saml_attribute_assertion.py @ 5907

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

Move MyProxy? certificate callout application into ndg.security.server and ndg.security.test. Too much trouble as separate egg.

Line 
1#!/usr/bin/env python
2"""Unit tests for NDG Security MyProxy Extensions callout for adding SAML
3Attribute Assertions to issued X.509 Certificates
4
5NERC DataGrid Project
6"""
7__author__ = "P J Kershaw"
8__date__ = "29/10/09"
9__copyright__ = "(C) 2009 Science and Technology Facilities Council"
10__license__ = "BSD - see LICENSE file in top-level directory"
11__contact__ = "Philip.Kershaw@stfc.ac.uk"
12__revision__ = '$Id:$'
13import logging
14logging.basicConfig(level=logging.DEBUG)
15
16from ndg.security.test.unit import BaseTestCase
17from ndg.security.server.myproxy.certificate_extapp.saml_attribute_assertion \
18    import SamlAssertionMyProxyCertExtApp
19   
20
21class SamlAssertionMyProxyCertExtAppTestCase(BaseTestCase):
22    def __init__(self, *arg, **kw):
23        super(SamlAssertionMyProxyCertExtAppTestCase, self).__init__(*arg, 
24                                                                     **kw)           
25        self.startSiteAAttributeAuthority()
26       
27    def test01(self):
28        myProxyCertExtApp = SamlAssertionMyProxyCertExtApp()
29        myProxyCertExtApp.attributeAuthorityURI = \
30            'http://localhost/5000/AttributeAuthority/saml'
31        myProxyCertExtApp.issuerName = "Test"
32        myProxyCertExtApp.userOpenID = "https://openid.localhost/philip.kershaw"
33        assertion = myProxyCertExtApp.attributeQuery()
Note: See TracBrowser for help on using the repository browser.