BF: Fix FailRegex.search test case for 0.9

pull/531/head
Daniel Black 2013-12-29 21:18:01 +00:00
parent ea2a13946e
commit d1ea8e85f8
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -753,7 +753,7 @@ class RegexTests(unittest.TestCase):
# e.g. if we made it optional.
fr = FailRegex('%%<HOST>?')
self.assertFalse(fr.hasMatched())
fr.search(("%%",))
fr.search([('%%',"","")])
self.assertTrue(fr.hasMatched())
self.assertRaises(RegexException, fr.getHost)