Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/authz/xacml/test_xacml.py@6731
Revision 6731,
526 bytes
checked in by pjkersha, 11 years ago
(diff) |
Work on XACML !ETree based parsing. Added first basic unit test.
|
Line | |
---|
1 | ''' |
---|
2 | Created on 16 Mar 2010 |
---|
3 | |
---|
4 | @author: pjkersha |
---|
5 | ''' |
---|
6 | import unittest |
---|
7 | from os import path |
---|
8 | |
---|
9 | from ndg.security.common.authz.xacml.etree.parsers.policyreader import PolicyReader |
---|
10 | |
---|
11 | class XACMLTestCase(unittest.TestCase): |
---|
12 | THIS_DIR = path.dirname(__file__) |
---|
13 | XACML_FILENAME = "rule1.xml" |
---|
14 | XACML_FILEPATH = path.join(THIS_DIR, XACML_FILENAME) |
---|
15 | |
---|
16 | def test01ETreeParsePolicy(self): |
---|
17 | policy = PolicyReader.parse(XACMLTestCase.XACML_FILEPATH) |
---|
18 | self.assert_(policy) |
---|
19 | |
---|
20 | |
---|
21 | if __name__ == "__main__": |
---|
22 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.