Module: check_mk
Branch: master
Commit: 044e2052b853790e1e7738bdb19d910f7aa43206
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=044e2052b85379…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 28 08:24:10 2019 +0100
Try to fix new flanky test_lnx_if unit test
Change-Id: If042c1a6e5ca373c029eacf28de36db1117679d5
---
tests/unit/checks/test_lnx_if.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/tests/unit/checks/test_lnx_if.py b/tests/unit/checks/test_lnx_if.py
index 9ce4f7f..22678a8 100644
--- a/tests/unit/checks/test_lnx_if.py
+++ b/tests/unit/checks/test_lnx_if.py
@@ -1,4 +1,4 @@
-import pytest
+import pytest # type: ignore
from cmk_base.check_api import MKCounterWrapped
from checktestlib import CheckResult, assertCheckResultsEqual
@@ -36,7 +36,16 @@ def parsed_change(bandwidth_change):
]
-DISCOVERY = [('5', "{'state': ['1'], 'speed':
10000000}"), ('6', "{'state': ['1'], 'speed':
0}")]
+DISCOVERY = [
+ ('5', "%r" % {
+ 'state': ['1'],
+ 'speed': 10000000
+ }),
+ ('6', "%r" % {
+ 'state': ['1'],
+ 'speed': 0
+ }),
+]
@pytest.mark.parametrize('item, params, result', [