Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)

src/f/a/Fail2Ban-Old-SVNGIT-HEAD/testcases/filtertestcase.py   Fail2Ban-Old-SVNGIT(Download)
 
import unittest
from server.filterpoll import FilterPoll
from server.filter import FileFilter
from server.failmanager import FailManager
	def setUp(self):
		"""Call before every test case."""
		self.__filter = FilterPoll(None)
		self.__filter.addLogPath(LogFile.FILENAME)
 

src/f/a/fail2ban-HEAD/fail2ban/tests/utils.py   fail2ban(Download)
	#
 
	from ..server.filterpoll import FilterPoll
	filters = [FilterPoll]					  # always available
 

src/f/a/fail2ban-HEAD/fail2ban/tests/filtertestcase.py   fail2ban(Download)
 
from ..server.jail import Jail
from ..server.filterpoll import FilterPoll
from ..server.filter import Filter, FileFilter, DNSUtils
from ..server.failmanager import FailManagerEmpty
	def testMissingLogFiles(self):
		self.filter = FilterPoll(None)
		self.assertRaises(IOError, self.filter.addLogPath, LogFile.MISSING)
 
class LogFileFilterPoll(unittest.TestCase):
	def setUp(self):
		"""Call before every test case."""
		self.filter = FilterPoll(DummyJail())
		self.filter.addLogPath(LogFileFilterPoll.FILENAME)
 
		_, self.name = tempfile.mkstemp('fail2ban', 'monitorfailures')
		self.file = open(self.name, 'a')
		self.filter = FilterPoll(DummyJail())
		self.filter.addLogPath(self.name)
		self.filter.active = True