mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
BF: give a custom prefix to a tempfile and close it upon tearDown in ExecuteActions tests
This commit is contained in:
parent
8cb6ec54ac
commit
f206c3d493
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue