Commit Graph

13 Commits

Author SHA1 Message Date
Chris PeBenito
6d7a672611 Update static testing and fix identified issues.
* Change pep8 to new pycodestyle tool.
* Load the policrep extension in pylint
2018-08-11 20:46:06 -04:00
Chris PeBenito
2b4d69d42e Revise structure to make policyrep a module instead of a subpackage.
The setools.policyrep.exception module merged into setools.exception.
2018-08-11 20:46:01 -04:00
Chris PeBenito
dc3752e12d tests: Fix static analysis errors. 2018-06-15 20:26:49 -04:00
Chris PeBenito
51b91d6130 Convert policyrep and SWIG wrapper into Cython libpolicyrep. 2018-06-15 20:26:49 -04:00
Chris PeBenito
9fa55c25cb Update unit tests for Python 3 only use. 2017-09-19 20:58:03 -04:00
Chris PeBenito
f3fb462c88 Implement an enumeration for TE rule types. 2016-09-03 16:17:07 -04:00
Chris PeBenito
c56e01bc8c Complete policy representation classes for extended permissions rules.
Related to #73.
2016-03-22 10:26:43 -04:00
Chris PeBenito
fcfba569cc qpol.i: throw exceptions when getting the conditional block on unconditional rules
Standardize on AttributeError for the exception type.
2016-03-11 09:14:32 -05:00
Chris PeBenito
eafaad4dde Revise rule type validators to operate on single object, not collections.
* Return the parameter on success so it works like a lookup function too
* Remove RuletypeDescriptor and change over to CriteriaSetDescriptor
2016-02-01 09:00:54 -05:00
Chris PeBenito
12b40d5e75 PolicyRule/BaseTERule/AVRule/TERule: add conditional block
Returns True/False based on which conditional block/branch the rule is in.
Also updates rendering accordingly.
2016-01-02 17:47:41 -05:00
Chris PeBenito
b1c2901e4f tests: fix iter() use in Mock objects
By using return_value, there was only one instance of the iterator, which
would cause problems if it needed to be used again but had already been
consumed. Switch to lambdas that return a new instance of the iter().
2015-04-18 10:47:42 -04:00
Chris PeBenito
05da568b15 Clean up unused imports in RBAC and TE rule tests. 2015-04-13 10:08:15 -04:00
Chris PeBenito
25a5c1adab Implement AVRuleTest and TERuleTest. 2015-04-12 10:51:58 -04:00