summaryrefslogtreecommitdiffstats
path: root/test/test_configuration_example.py
blob: c7ed31070c8f0706c189194f6dae235880b68f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Sample usage of AnsibleConfig."""

from ansible_compat.config import AnsibleConfig


def test_example_config() -> None:
    """Test basic functionality of AnsibleConfig."""
    cfg = AnsibleConfig()
    assert isinstance(cfg.ACTION_WARNINGS, bool)
    # you can also use lowercase:
    assert isinstance(cfg.action_warnings, bool)
    # you can also use it as dictionary
    assert cfg["action_warnings"] == cfg.action_warnings