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
pull/272/head
Yaroslav Halchenko 2013-05-29 12:38:03 -04:00
parent ea6f3bedb0
commit 9f9e9a33c6
1 changed files with 3 additions and 3 deletions

View File

@ -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 '<blocktype>' 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):