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

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

src/f/a/fail2ban-HEAD/fail2ban/tests/databasetestcase.py   fail2ban(Download)
import shutil
 
from ..server.filter import FileContainer
from ..server.mytime import MyTime
from ..server.ticket import FailTicket
 
		_, filename = tempfile.mkstemp(".log", "Fail2BanDb_")
		self.fileContainer = FileContainer(filename, "utf-8")
 
		self.db.addLog(self.jail, self.fileContainer)
 
		# New FileContainer for file
		self.fileContainer = FileContainer(filename, "utf-8")
		self.assertEqual(self.fileContainer.getPos(), 0)
 
		file_.close()
 
		self.fileContainer = FileContainer(filename, "utf-8")
		self.assertEqual(self.fileContainer.getPos(), 0)