class TestCompiledRule(unittest.TestCase): def setUp(self): self.processor = Processor(['./test_compiled.rule'], compiled=True) def test_match(self): self.processor.data = 'This is a dirty string.' results = self.processor.analyze() self.assertTrue(results) def test_no_match(self): self.processor.data = 'This is a clean string.' results = self.processor.analyze() self.assertFalse(results)
class TestCompiledRule(unittest.TestCase): def setUp(self): self.processor = Processor(["./test_compiled.rule"], compiled=True) def test_match(self): self.processor.data = "This is a dirty string." results = self.processor.analyze() self.assertTrue(results) def test_no_match(self): self.processor.data = "This is a clean string." results = self.processor.analyze() self.assertFalse(results)
def setUp(self): self.processor = Processor(['./test_compiled.rule'], compiled=True)
def setUp(self): self.processor = Processor(['./test.rule'])
def setUp(self): self.processor = Processor(["./test_compiled.rule"], compiled=True)
def setUp(self): self.processor = Processor(["./test.rule"])