mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Adding more unit tests for AnsibleModule things in basic.py
This commit is contained in:
parent
0e68c6d6fe
commit
8eadc1d8eb
3 changed files with 128 additions and 0 deletions
|
@ -99,6 +99,12 @@ class TestModuleUtilsBasic(unittest.TestCase):
|
|||
mock_import.side_effect = _mock_import
|
||||
mod = builtins.__import__('ansible.module_utils.basic')
|
||||
|
||||
# FIXME: doesn't work yet
|
||||
#@patch.object(builtins, 'bytes')
|
||||
#def test_module_utils_basic_bytes(self, mock_bytes):
|
||||
# mock_bytes.side_effect = NameError()
|
||||
# from ansible.module_utils import basic
|
||||
|
||||
@patch.object(builtins, '__import__')
|
||||
@unittest.skipIf(sys.version_info[0] >= 3, "Python 3 is not supported on targets (yet)")
|
||||
def test_module_utils_basic_import_literal_eval(self, mock_import):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue