Package ndg :: Package xacml :: Package test :: Package context :: Module test_pdp_with_attributeselector :: Class AttributeSelectorTestCase
[hide private]

Class AttributeSelectorTestCase

source code

            object --+        
                     |        
unittest.case.TestCase --+    
                         |    
  XacmlContextBaseTestCase --+
                             |
                            AttributeSelectorTestCase

Tests use of AttributeSelector in policies with resource content XML in the requests.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
_make_resource_content_element(self, resourceContent) source code
 
test01NotApplicable(self) source code
 
test02Permit(self) source code
 
test03Deny(self) source code
 
test04Indeterminate(self)
This should result in an indeterminate decision because the policy includes an AttributeSelector with MustBePresent="true", whereas the request context path is not found in the request XML.
source code
 
test05ExecutePermit(self) source code
 
test06ExecuteConditionPermit(self) source code
 
test07ExecuteConditionDeny(self) source code
 
test08ExecuteLxmlPermit(self) source code
 
test09SelectAttributePermit(self) source code
 
test10SelectAttributeDeny(self) source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, setUp, shortDescription, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Static Methods [hide private]
 
_make_element(tag, ns_prefix, ns_uri) source code
Class Variables [hide private]
  NOT_APPLICABLE_RESOURCE_ID = 'https://localhost'
  PUBLIC_RESOURCE_ID = 'http://localhost/resource-only-restricted'
  RESOURCE_CONTENT_VERSION_100 = '<wps:GetCapabilities xmlns:ows...
  RESOURCE_CONTENT_VERSION_200 = '<wps:GetCapabilities xmlns:ows...
  RESOURCE_CONTENT_NO_VERSION = '<wps:GetCapabilities xmlns:ows=...
  RESOURCE_CONTENT_EXECUTE = '<?xml version="1.0" encoding="UTF-...

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

RESOURCE_CONTENT_VERSION_100

Value:
'''<wps:GetCapabilities xmlns:ows="http://www.opengis.net/ows/1.1"
                     xmlns:wps="http://www.opengis.net/wps/1.0.0"
                     xmlns:xlink="http://www.w3.org/1999/xlink"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta\
nce"
                     xsi:schemaLocation="http://www.opengis.net/wps/1.\
0.0/wpsGetCapabilities_request.xsd"
                     language="en-CA" service="WPS">
...

RESOURCE_CONTENT_VERSION_200

Value:
'''<wps:GetCapabilities xmlns:ows="http://www.opengis.net/ows/1.1"
                     xmlns:wps="http://www.opengis.net/wps/1.0.0"
                     xmlns:xlink="http://www.w3.org/1999/xlink"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta\
nce"
                     xsi:schemaLocation="http://www.opengis.net/wps/1.\
0.0/wpsGetCapabilities_request.xsd"
                     language="en-CA" service="WPS">
...

RESOURCE_CONTENT_NO_VERSION

Value:
'''<wps:GetCapabilities xmlns:ows="http://www.opengis.net/ows/1.1"
                     xmlns:wps="http://www.opengis.net/wps/1.0.0"
                     xmlns:xlink="http://www.w3.org/1999/xlink"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta\
nce"
                     xsi:schemaLocation="http://www.opengis.net/wps/1.\
0.0/wpsGetCapabilities_request.xsd"
                     language="en-CA" service="WPS">
...

RESOURCE_CONTENT_EXECUTE

Value:
'''<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0"
             xmlns:wps="http://www.opengis.net/wps/1.0.0"
             xmlns:ows="http://www.opengis.net/ows/1.1"
             xmlns:xlink="http://www.w3.org/1999/xlink"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.opengis.net/wps/1.0.0/wpsE\
xecute_request.xsd">
...