diff options
Diffstat (limited to 'test/test_mockings.py')
-rw-r--r-- | test/test_mockings.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_mockings.py b/test/test_mockings.py index 0e8d77a..417d5d5 100644 --- a/test/test_mockings.py +++ b/test/test_mockings.py @@ -1,18 +1,18 @@ """Test mockings module.""" -from typing import Any + +from pathlib import Path import pytest from ansiblelint._mockings import _make_module_stub -from ansiblelint.config import options +from ansiblelint.config import Options from ansiblelint.constants import RC -def test_make_module_stub(mocker: Any) -> None: +def test_make_module_stub(config_options: Options) -> None: """Test make module stub.""" - mocker.patch("ansiblelint.config.options.cache_dir", return_value=".") - assert options.cache_dir is not None + config_options.cache_dir = Path() # current directory with pytest.raises(SystemExit) as exc: - _make_module_stub(module_name="", options=options) + _make_module_stub(module_name="", options=config_options) assert exc.type == SystemExit assert exc.value.code == RC.INVALID_CONFIG |