summaryrefslogtreecommitdiffstats
path: root/test/test_configuration_example.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:24:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:24:37 +0000
commit1022b2cebe73db426241c2f420d4ee9f6f3c1bed (patch)
treea5c38ccfaa66e8a52767dec01d3598b67a7422a8 /test/test_configuration_example.py
parentInitial commit. (diff)
downloadpython-ansible-compat-1022b2cebe73db426241c2f420d4ee9f6f3c1bed.tar.xz
python-ansible-compat-1022b2cebe73db426241c2f420d4ee9f6f3c1bed.zip
Adding upstream version 4.1.11.upstream/4.1.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_configuration_example.py')
-rw-r--r--test/test_configuration_example.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_configuration_example.py b/test/test_configuration_example.py
new file mode 100644
index 0000000..3a2c9b7
--- /dev/null
+++ b/test/test_configuration_example.py
@@ -0,0 +1,12 @@
+"""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