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 | ea4f2c58c39d181ce1c3faf86faa6e724b21ed7e (patch) | |
tree | 9b77b8be57db6050b613171b15211f8372aa7aba /test/test_runtime.py | |
parent | Adding upstream version 4.1.12. (diff) | |
download | python-ansible-compat-ea4f2c58c39d181ce1c3faf86faa6e724b21ed7e.tar.xz python-ansible-compat-ea4f2c58c39d181ce1c3faf86faa6e724b21ed7e.zip |
Adding upstream version 24.5.1.upstream/24.5.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_runtime.py')
-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") |