From d1ea8e85f8b59dfdbfac4f55a8ee9b16d73daf40 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sun, 29 Dec 2013 21:18:01 +0000 Subject: [PATCH] BF: Fix FailRegex.search test case for 0.9 --- fail2ban/server/failregex.py | 2 +- fail2ban/tests/servertestcase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index d3299144..28ee8ef5 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -72,7 +72,7 @@ class Regex: # Sets an internal cache (match object) in order to avoid searching for # the pattern again. This method must be called before calling any other # method of this object. - # @param value the line + # @param a list of tupples. The tupples are ( prematch, datematch, postdatematch ) def search(self, tupleLines): self._matchCache = self._regexObj.search( diff --git a/fail2ban/tests/servertestcase.py b/fail2ban/tests/servertestcase.py index 082c20de..bbfc0f0f 100644 --- a/fail2ban/tests/servertestcase.py +++ b/fail2ban/tests/servertestcase.py @@ -753,7 +753,7 @@ class RegexTests(unittest.TestCase): # e.g. if we made it optional. fr = FailRegex('%%?') self.assertFalse(fr.hasMatched()) - fr.search(("%%",)) + fr.search([('%%',"","")]) self.assertTrue(fr.hasMatched()) self.assertRaises(RegexException, fr.getHost)