File: test_configuration_example.py

package info (click to toggle)
python-ansible-compat 25.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 656 kB
  • sloc: python: 2,522; sh: 26; makefile: 24
file content (13 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
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