The congress.tests.policy_engines.brokentest_agnostic Module¶
-
class
congress.tests.policy_engines.brokentest_agnostic.TestRuntime(*args, **kwargs)¶ Bases:
congress.tests.base.TestCase-
check_class(run, correct_database_code, msg=None)¶ Test MAT_THEORY.
Check that runtime RUN’s MAT_THEORY theory has exactly the same contents as CORRECT_DATABASE_CODE.
-
check_db(run, correct_database_code, msg=None)¶ Test DB_THEORY.
Check that runtime RUN.theory[DB_THEORY] is equal to CORRECT_DATABASE_CODE.
-
check_db_diffs(actual, correct, msg)¶
-
check_equal(actual_code, correct_code, msg=None, equal=None)¶
-
check_instance(actual_code, correct_code, msg=None)¶ Checks if ACTUAL_CODE is an instance of CORRECT_CODE.
-
check_proofs(run, correct, msg=None)¶ Test proofs.
Check that the proofs stored in runtime RUN are exactly those in CORRECT.
-
check_same(actual_code, correct_code, msg=None)¶ Checks if ACTUAL_CODE is a variable-renaming of CORRECT_CODE.
-
delete(run, alist)¶
-
insert(run, alist, target=None)¶
-
output_diffs(extra, missing, msg, actual=None)¶
-
prep_runtime(code=None, msg=None, target=None)¶
-
showdb(run)¶
-
test_access_control()¶ Test access control: whether a given action is permitted.
-
test_enforcement()¶ Test enforcement.
-
test_neutron_actions()¶ Test our encoding of the Neutron actions basics by simulation.
-
test_remediation()¶ Test remediation computation.
-
-
congress.tests.policy_engines.brokentest_agnostic.form2str(formula)¶
-
congress.tests.policy_engines.brokentest_agnostic.pol2str(policy)¶
-
congress.tests.policy_engines.brokentest_agnostic.str2form(formula_string)¶
-
congress.tests.policy_engines.brokentest_agnostic.str2pol(policy_string)¶