agent broken test in Py 3.6: TestScriptRunner.test_script_runner_downloable

Bug #1752847 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
New
Undecided
Unassigned

Bug Description

Hi. Building murano-agent 3.4.0 (aka: Queens release) in Debian Sid using Python 3.6 leads to the below stack dump. It looks like the test is broken (but I can't tell about the code...) since we're seeing a MagicMock object from unittest / mock.

FAIL: muranoagent.tests.unit.test_script_runner.TestScriptRunner.test_script_runner_downloable
muranoagent.tests.unit.test_script_runner.TestScriptRunner.test_script_runner_downloable
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/<<PKGBUILDDIR>>/muranoagent/tests/unit/test_script_runner.py", line 42, in test_script_runner_downloable
    scripts._prepare_files()
  File "/<<PKGBUILDDIR>>/muranoagent/script_runner.py", line 75, in _prepare_files
    return os.path.join(self._files_manager._cache_folder, self._name)
  File "/usr/lib/python3.6/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not MagicMock

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.