mirror of https://github.com/fail2ban/fail2ban
BF: give a custom prefix to a tempfile and close it upon tearDown in ExecuteActions tests
parent
8cb6ec54ac
commit
f206c3d493
|
@ -35,9 +35,10 @@ class ExecuteActions(unittest.TestCase):
|
|||
"""Call before every test case."""
|
||||
self.__jail = DummyJail()
|
||||
self.__actions = Actions(self.__jail)
|
||||
self.__tmpfile, self.__tmpfilename = tempfile.mkstemp()
|
||||
self.__tmpfile, self.__tmpfilename = tempfile.mkstemp('fail2ban', 'executeactions')
|
||||
|
||||
def tearDown(self):
|
||||
os.close(self.__tmpfile)
|
||||
os.remove(self.__tmpfilename)
|
||||
|
||||
def defaultActions(self):
|
||||
|
|
Loading…
Reference in New Issue