class TestFilenameStartsWith(unittest.TestCase):
    def setUp(self):
        self.rule = FilenameStartsWith('test_')

    def test_case_sensitive_match(self):
        self.rule.case_sensitive = True
        self.assertTrue(self.rule.test('/tmp/test_file.log'))
        self.assertFalse(self.rule.test('/tmp/TEST_FILE.log'))

    def test_case_insensitive_match(self):
        self.rule.case_sensitive = False
        self.assertTrue(self.rule.test('/tmp/test_file.log'))
        self.assertTrue(self.rule.test('/tmp/TEST_FILE.log'))
 def setUp(self):
     self.rule = FilenameStartsWith('test_')