source: TI12-security/trunk/NDG_XACML/ndg/xacml/test/test_matchfunctions.py @ 6778

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDG_XACML/ndg/xacml/test/test_matchfunctions.py@6778
Revision 6778, 1013 bytes checked in by pjkersha, 10 years ago (diff)

Split unit test module into policy, context, match function test related modules.

Line 
1"""NDG XACML functions unit test package
2
3NERC DataGrid Project
4"""
5__author__ = "P J Kershaw"
6__date__ = "26/03/10"
7__copyright__ = "(C) 2010 Science and Technology Facilities Council"
8__contact__ = "Philip.Kershaw@stfc.ac.uk"
9__license__ = "BSD - see LICENSE file in top-level directory"
10__contact__ = "Philip.Kershaw@stfc.ac.uk"
11__revision__ = "$Id: $"
12import unittest
13from os import path
14import logging
15logging.basicConfig(level=logging.DEBUG)
16
17from ndg.xacml.core.functions import FunctionMap
18from ndg.xacml.core.functions.v2.anyuri_regexp_match import AnyURIRegexpMatch
19
20
21class FunctionTestCase(unittest.TestCase):
22    """Test XACML match functions implementation"""
23   
24    def test01LoadMap(self):   
25        funcMap = FunctionMap()
26        funcMap.load()
27        anyUriMatchNs = \
28            'urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match'
29           
30        self.assert_(isinstance(funcMap.get(anyUriMatchNs), AnyURIRegexpMatch))
31
32       
33if __name__ == "__main__":
34    unittest.main()
Note: See TracBrowser for help on using the repository browser.