Module: check_mk
Branch: master
Commit: 9167df85fc114b854c3da1171dec007c34963706
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9167df85fc114b…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Nov 28 12:58:22 2017 +0100
Rename test parameter
Change-Id: I965447db38e9fb096a2fea2b85711cbed86b51f7
---
tests/checks/test_df_check.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/checks/test_df_check.py b/tests/checks/test_df_check.py
index 3f66fd2..9ca654a 100644
--- a/tests/checks/test_df_check.py
+++ b/tests/checks/test_df_check.py
@@ -216,7 +216,7 @@ info_df_btrfs = \
# | |
# '----------------------------------------------------------------------'
-(a)pytest.mark.parametrize("info,result,include_volume_name"name", [
+@pytest.mark.parametrize("info,expected_result,include_volume_name", [
([], [], False),
(info_df_lnx, [(u'/', {})], False),
(info_df_lnx, [(u'/dev/sda4 /', {})], True),
@@ -227,8 +227,7 @@ info_df_btrfs = \
(info_df_btrfs, [(u'/sys/fs/cgroup', {}), (u'btrfs /dev/sda1', {})],
False),
(info_df_btrfs, [(u'/dev/sda1 /sys/fs/cgroup', {}), (u'/dev/sda1 btrfs
/dev/sda1', {})], True),
])
-def test_df_discovery_with_parse(check_manager, monkeypatch, info, result,
include_volume_name):
- import cmk_base.checks
+def test_df_discovery_with_parse(check_manager, monkeypatch, info, expected_result,
include_volume_name):
import cmk_base
# NOTE: This commented-out code is the result of trying to mock the the ruleset
variable itself instead of the
@@ -239,5 +238,5 @@ def test_df_discovery_with_parse(check_manager, monkeypatch, info,
result, inclu
check = check_manager.get_check("df")
monkeypatch.setitem(cmk_base.checks._check_contexts["df"],
"host_extra_conf_merged", lambda _, __: {"include_volume_name":
include_volume_name})
- assert check.run_discovery(check.run_parse(info)) == result
+ assert check.run_discovery(check.run_parse(info)) == expected_result
cmk_base.config_cache.clear_all()