diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 05:17:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 05:17:02 +0000 |
commit | 514d068b7f78ac67e4dc5ba4fdef73f1f8853558 (patch) | |
tree | 9e5015ff35b09b0b55397d1819bc6d09e7890d42 /test | |
parent | Adding debian version 4.1.12-1. (diff) | |
download | python-ansible-compat-514d068b7f78ac67e4dc5ba4fdef73f1f8853558.tar.xz python-ansible-compat-514d068b7f78ac67e4dc5ba4fdef73f1f8853558.zip |
Merging upstream version 24.5.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/test_runtime.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_runtime.py b/test/test_runtime.py index 6a110d4..0823f60 100644 --- a/test/test_runtime.py +++ b/test/test_runtime.py @@ -893,3 +893,16 @@ def test_get_galaxy_role_name_invalid() -> None: "role_name": False, # <-- invalid data, should be string } assert _get_galaxy_role_name(galaxy_infos) == "" + + +def test_runtime_has_playbook() -> None: + """Tests has_playbook method.""" + runtime = Runtime(require_module=True) + + assert not runtime.has_playbook("this-does-not-exist.yml") + # call twice to ensure cache is used: + assert not runtime.has_playbook("this-does-not-exist.yml") + + assert not runtime.has_playbook("this-does-not-exist.yml", basedir=Path()) + # this is part of community.molecule collection + assert runtime.has_playbook("community.molecule.validate.yml") |