Ignore:
Timestamp:
08/06/10 16:33:29 (10 years ago)
Author:
pjkersha
Message:

Incomplete - task 5: MyProxy? Logon HTTPS Interface

  • Finished epydoc ready for first release to PyPI.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/MyProxyWebService/myproxy/server/test/test_httpbasicauth.py

    r6897 r6950  
    2222 
    2323class TestApp(object): 
     24    """Test WSGI Application for use with the unit tests for the HTTP Basic 
     25    Auth middleware developed for the myproxy.server.app.MyProxyApp application 
     26    """ 
    2427    def __init__(self, global_conf, **app_conf): 
    25         pass 
     28        """Follow standard Paste Deploy app factory function signature""" 
    2629     
    2730    def __call__(self, environ, start_response): 
     31        """Make a simple response for unit test code to trap and validate  
     32        against.  If this method is executed then the HTTP Basic Auth step in 
     33        the upstream middleware has succeeded. 
     34        """ 
    2835        contentType = 'text/plain' 
    2936        response = 'Authenticated!' 
     
    4552     
    4653    def __init__(self, app, global_conf, **app_conf): 
     54        """Follow standard Paste Deploy app factory function signature""" 
    4755        self.app = app 
    4856         
     
    7987     
    8088    def __init__(self, app, global_conf, **app_conf): 
     89        """Follow standard Paste Deploy app factory function signature""" 
    8190        self.app = app 
    8291         
    8392    def __call__(self, environ, start_response): 
     93        """Create HTTP Basic Auth callback""" 
    8494        def authenticate(environ, start_response, username, password): 
     95            """HTTP Basic Auth callback function""" 
    8596            if (username != self.__class__.USERNAME or 
    8697                password != self.__class__.PASSWORD): 
     
    93104 
    94105class HttpBasicAuthMiddlewareTestCase(unittest.TestCase): 
     106    """Unit tests for HTTP Basic Auth middleware used with the MyProxyWebService 
     107    package 
     108    """ 
    95109    CONFIG_FILE = 'httpbasicauth.ini' 
    96110     
    97111    def __init__(self, *args, **kwargs): 
     112        """Set-up Paste fixture from ini file settings""" 
    98113        here_dir = os.path.dirname(os.path.abspath(__file__)) 
    99114        configFilePath = ('config:%s' %  
Note: See TracChangeset for help on using the changeset viewer.