The congress.tests.common.test_policy Module¶
Test of Policy Engine For Congress.
- 
class 
congress.tests.common.test_policy.AdminRolePolicyTestCase(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase- 
setUp()¶ 
- 
test_enforce_admin_actions_with_nonadmin_context_throws()¶ test for non-admin context
Check if non-admin context passed to admin actions throws Policy not authorized exception
- 
 
- 
class 
congress.tests.common.test_policy.DefaultPolicyTestCase(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase- 
setUp()¶ 
- 
test_default_not_found()¶ 
- 
test_not_found_policy_calls_default()¶ 
- 
test_policy_called()¶ 
- 
 
- 
class 
congress.tests.common.test_policy.IsAdminCheckTestCase(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase- 
setUp()¶ 
- 
test_call_false()¶ 
- 
test_call_true()¶ 
- 
test_init_false()¶ 
- 
test_init_true()¶ 
- 
 
- 
class 
congress.tests.common.test_policy.PolicyFileTestCase(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase- 
setUp()¶ 
- 
test_modified_policy_reloads()¶ 
- 
 
- 
class 
congress.tests.common.test_policy.PolicyTestCase(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase- 
setUp()¶ 
- 
test_early_AND_enforcement()¶ 
- 
test_early_OR_enforcement()¶ 
- 
test_enforce_bad_action_noraise()¶ 
- 
test_enforce_bad_action_throws()¶ 
- 
test_enforce_good_action()¶ 
- 
test_enforce_http_false(*args, **keywargs)¶ 
- 
test_enforce_http_true(*args, **keywargs)¶ 
- 
test_enforce_nonexistent_action_throws()¶ 
- 
test_ignore_case_role_check()¶ 
- 
test_templatized_enforcement()¶ 
-