Debian Codegraph @

test/units/module_utils/basic/test_get_module_path.py

raw
1 # -*- coding: utf-8 -*-
2 # (c) 2012-2014, Michael DeHaan <[email protected]>
3 # (c) 2016 Toshio Kuratomi <[email protected]>
4 # (c) 2017 Ansible Project
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 from __future__ import annotations
8
9 import unittest
10
11 from unittest.mock import patch
12
13
14 class TestGetModulePath(unittest.TestCase):
15 def test_module_utils_basic_get_module_path(self):
16 from ansible.module_utils.basic import get_module_path
17 with patch('os.path.realpath', return_value='/path/to/foo/'):
18 self.assertEqual(get_module_path(), '/path/to/foo')