ansible/test/units/plugins
Marius Gedminas d9b89ca577 Fix a test failure on Python 3.6 (#20030)
* Fix a test failure on Python 3.6

tox -e py36 failed with

    ======================================================================
    ERROR: test_action_base__execute_module (units.plugins.action.test_action.TestActionBase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/mg/src/ansible/test/units/plugins/action/test_action.py", line 507, in test_action_base__execute_module
        self.assertEqual(action_base._execute_module(), dict(_ansible_parsed=True, rc=0, stdout="ok", stdout_lines=['ok']))
      File "/home/mg/src/ansible/lib/ansible/plugins/action/__init__.py", line 596, in _execute_module
        remote_module_path = self._connection._shell.join_path(tmp, remote_module_filename)
      File "/home/mg/opt/python36/lib/python3.6/unittest/mock.py", line 939, in __call__
        return _mock_self._mock_call(*args, **kwargs)
      File "/home/mg/opt/python36/lib/python3.6/unittest/mock.py", line 1005, in _mock_call
        ret_val = effect(*args, **kwargs)
      File "/home/mg/src/ansible/.tox/py36/lib/python3.6/posixpath.py", line 92, in join
        genericpath._check_arg_types('join', a, *p)
      File "/home/mg/src/ansible/.tox/py36/lib/python3.6/genericpath.py", line 149, in _check_arg_types
        (funcname, s.__class__.__name__)) from None
    TypeError: join() argument must be str or bytes, not 'MagicMock'

because os.path.join() now checks argument types since Python 3.6 (due
to pathlib support, I expect).

* Use a more realistic module name in test
2017-01-09 12:42:30 -08:00
..
action Fix a test failure on Python 3.6 (#20030) 2017-01-09 12:42:30 -08:00
cache Provide slightly better msg on fact cache error (#18759) 2016-12-13 14:34:58 -05:00
callback Improve --diff output when files lack trailing newlines 2017-01-09 11:49:03 -05:00
connection add back reverted change to network_cli (#18761) 2016-12-05 21:42:09 -05:00
filter Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
inventory Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
lookup Lastpass lookup plugin (#16285) 2016-12-22 14:47:33 -08:00
shell Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
strategy Template "original_task" fields in _process_pending_results 2016-12-21 10:09:06 -06:00
vars Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
test_plugins.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00