Ignore:
Timestamp:
24/09/08 16:25:09 (12 years ago)
Author:
pjkersha
Message:

More work on WSGI version of Attribute Authority unit tests. TODO: complete code to enable WS-Security config to be picked up from within the Paste ini file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/siteAServerApp.py

    r4195 r4233  
    11#!/usr/bin/env python 
     2"""NDG Security Attribute Authority test harness for unit test site 'A' 
     3 
     4NERC Data Grid Project 
     5 
     6This software may be distributed under the terms of the Q Public License, 
     7version 1.0 or later. 
     8""" 
     9__author__ = "P J Kershaw" 
     10__date__ = "24/09/08" 
     11__copyright__ = "(C) 2008 STFC & NERC" 
     12__contact__ = "P.J.Kershaw@rl.ac.uk" 
     13__revision__ = "$Id$" 
    214import os 
    315 
     
    2032#                                     "siteAAttAuthority.cfg") 
    2133                                     "siteAAttAuthorityProperties.xml") 
    22     
    23 if 'NDGSEC_DIR' in os.environ: 
    24     tacFilePath=os.path.join(os.environ['NDGSEC_DIR'], 
    25                              "conf", 
    26                              "attAuthority.tac") 
    27 else: 
    28     import pkg_resources 
    29     eggConfigDir=pkg_resources.resource_filename('ndg.security.server','conf') 
    30     os.environ['NDGSEC_DIR'] = os.path.dirname(eggConfigDir) 
    3134 
    3235# To start the Site A Attribute Authority run  
     
    3538if __name__ == '__main__': 
    3639    import sys 
    37     if len(sys.argv) > 0: 
     40    if len(sys.argv) > 1: 
    3841        port = int(sys.argv[1]) 
    3942    else: 
     
    4144         
    4245    cfgFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
    43                                 'site-a.ini') 
     46                               'site-a.ini') 
    4447         
    4548    from paste.httpserver import serve 
Note: See TracChangeset for help on using the changeset viewer.