summaryrefslogtreecommitdiffstats
path: root/test/test_mockings.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 16:04:56 +0000
commitd964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 (patch)
tree794bc3738a00b5e599f06d1f2f6d79048d87ff8e /test/test_mockings.py
parentInitial commit. (diff)
downloadansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.tar.xz
ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.zip
Adding upstream version 6.13.1.upstream/6.13.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_mockings.py')
-rw-r--r--test/test_mockings.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_mockings.py b/test/test_mockings.py
new file mode 100644
index 0000000..304cb6c
--- /dev/null
+++ b/test/test_mockings.py
@@ -0,0 +1,13 @@
+"""Test mockings module."""
+import pytest
+
+from ansiblelint._mockings import _make_module_stub
+from ansiblelint.constants import INVALID_CONFIG_RC
+
+
+def test_make_module_stub() -> None:
+ """Test make module stub."""
+ with pytest.raises(SystemExit) as exc:
+ _make_module_stub("")
+ assert exc.type == SystemExit
+ assert exc.value.code == INVALID_CONFIG_RC