The congress.tests.datalog.test_compiler Module

class congress.tests.datalog.test_compiler.TestColumnReferences(*args, **kwargs)

Bases: congress.tests.base.TestCase

class SchemaWrapper(schema)

Bases: object

Placeholder so we don’t use the actual policy-engine for tests.

TestColumnReferences.test_column_references_atom()

Test column references occurring in a single atom in a rule.

TestColumnReferences.test_column_references_lowlevel()

Test column-references with low-level checks.

TestColumnReferences.test_column_references_multiple_atoms()

Test column references occurring in multiple atoms in a rule.

TestColumnReferences.test_column_references_parse_errors()

Test invalid column references occurring in a single atom.

TestColumnReferences.test_column_references_validation_errors()

Test invalid column references occurring in a single atom.

TestColumnReferences.test_eliminate_column_references_body_order()

Test eliminate_column_references preserves order insensitivity.

TestColumnReferences.test_hash()
TestColumnReferences.test_lessthan()
class congress.tests.datalog.test_compiler.TestCompiler(*args, **kwargs)

Bases: congress.tests.base.TestCase

test_module_schemas()

Test that rules are properly checked against module schemas.

test_rule_recursion()
test_rule_stratification()
test_rule_validation()

Test that rules are properly validated.

test_type_checkers()

Test the type checkers, e.g. is_atom, is_rule.

class congress.tests.datalog.test_compiler.TestDependencyGraph(*args, **kwargs)

Bases: congress.tests.base.TestCase

test_dependencies()
test_modal_index()
test_modal_index_composition()
test_modals()
test_nodes_edges()
class congress.tests.datalog.test_compiler.TestParser(*args, **kwargs)

Bases: congress.tests.base.TestCase

test_event_equality()
test_event_facts()
test_event_rules()

Test modal operators.

test_modal_execute()
test_modal_failures()
test_rule_hash()

Test whether rules are properly hashed.

test_tablename()

Test correct parsing of tablenames.

test_update_rules()