atst/tests/domain/cloud/test_policy.py
dandds 3bfb6c9621 Basic implementation for a policy wrapper.
The implementation here is meant to wrap a library of JSON policy
documents. Policies should be added to directories corresponding to
where they will be defined (portfolio, application, environment).
Functionality for parsing portfolio policy definitions is included. When
the policies need to be defined on a management group, the
AzureCloudProvider can iterate the appropriate tier of the policy
manager and add those definitions.
2019-12-20 10:34:12 -05:00

9 lines
287 B
Python

from atst.domain.csp.policy import AzurePolicyManager, AzurePolicy
def test_portfolio_definitions():
manager = AzurePolicyManager("policies")
assert len(manager.portfolio_definitions) > 0
policy = manager.portfolio_definitions[0]
assert isinstance(policy, AzurePolicy)