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, 11 years ago
(diff) |
Split unit test module into policy, context, match function test related modules.
|
Line | |
---|
1 | """NDG XACML functions unit test package |
---|
2 | |
---|
3 | NERC 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: $" |
---|
12 | import unittest |
---|
13 | from os import path |
---|
14 | import logging |
---|
15 | logging.basicConfig(level=logging.DEBUG) |
---|
16 | |
---|
17 | from ndg.xacml.core.functions import FunctionMap |
---|
18 | from ndg.xacml.core.functions.v2.anyuri_regexp_match import AnyURIRegexpMatch |
---|
19 | |
---|
20 | |
---|
21 | class 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 | |
---|
33 | if __name__ == "__main__": |
---|
34 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.