Debian Codegraph @

ansible_collections/community/general/tests/unit/plugins/modules/test_linode.py

raw
1 # Copyright (c) Ansible Project
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 from __future__ import annotations
6
7 import pytest
8 from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
9
10 from ansible_collections.community.general.plugins.modules import linode
11
12 from .linode_conftest import api_key, auth # noqa: F401, pylint: disable=unused-import
13
14 if not linode.HAS_LINODE:
15 pytestmark = pytest.mark.skip("test_linode.py requires the `linode-python` module")
16
17
18 def test_name_is_a_required_parameter(api_key, auth):
19 with pytest.raises(SystemExit):
20 with set_module_args({}):
21 linode.main()