Module: check_mk
Branch: master
Commit: f459a51dc59f960c1cfc83c3358534146260f75d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f459a51dc59f96…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Feb 15 13:48:24 2018 +0100
checktestlib: Add __contains__ method to DiscoveryResult
Change-Id: Iee33cdfa27d0e00ef01262752640fa753e3bbb9a
---
tests/checks/checktestlib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/checks/checktestlib.py b/tests/checks/checktestlib.py
index 80626e4..93c6425 100644
--- a/tests/checks/checktestlib.py
+++ b/tests/checks/checktestlib.py
@@ -171,5 +171,8 @@ class DiscoveryResult(object):
return all(entry in other_value for entry in self.entries) and \
all(other_entry in self.entries for other_entry in other_value)
+ def __contains__(self, value):
+ return value in self.entries
+
def __repr__(self):
return "DiscoveryResult(%s)" % (",\n".join([repr(entry) for
entry in self.entries]))