BF: Fix FailRegex.search test case for 0.9

pull/531/head
Daniel Black 11 years ago
parent ea2a13946e
commit d1ea8e85f8

@ -72,7 +72,7 @@ class Regex:
# Sets an internal cache (match object) in order to avoid searching for # Sets an internal cache (match object) in order to avoid searching for
# the pattern again. This method must be called before calling any other # the pattern again. This method must be called before calling any other
# method of this object. # method of this object.
# @param value the line # @param a list of tupples. The tupples are ( prematch, datematch, postdatematch )
def search(self, tupleLines): def search(self, tupleLines):
self._matchCache = self._regexObj.search( self._matchCache = self._regexObj.search(

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

Loading…
Cancel
Save