From 9f9e9a33c635f6cfeea62527a06d180315268eec Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 29 May 2013 12:38:03 -0400 Subject: [PATCH] BF: in 0.9 it is allowed to have multiple same actions with different names -- so use action_name + address RF action._ActionReader__cInfo -> action._initOpts --- fail2ban/tests/clientreadertestcase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fail2ban/tests/clientreadertestcase.py b/fail2ban/tests/clientreadertestcase.py index 7812c23b..e4a6e463 100644 --- a/fail2ban/tests/clientreadertestcase.py +++ b/fail2ban/tests/clientreadertestcase.py @@ -295,13 +295,13 @@ class JailsReaderTest(unittest.TestCase): # Test for presence of blocktype (in relation to gh-232) for action in actions: commands = action.convert() - file_ = action.getFile() + action_name = action.getName() if '' in str(commands): # Verify that it is among cInfo - self.assertTrue('blocktype' in action._ActionReader__cInfo) + self.assertTrue('blocktype' in action._initOpts) # Verify that we have a call to set it up blocktype_present = False - target_command = [ 'set', jail_name, 'setcinfo', file_, 'blocktype' ] + target_command = [ 'set', jail_name, 'setcinfo', action_name, 'blocktype' ] for command in commands: if (len(command) > 5 and command[:5] == target_command):