ENH(TST): verify that passed bantime is non-0 and int

pull/1286/head
Yaroslav Halchenko 2015-12-29 19:56:45 -05:00
parent 28c9832293
commit b76aede40d
1 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,12 @@ class JailsReaderTest(LogCaptureTestCase):
# by default we have lots of jails ;)
self.assertTrue(len(comm_commands))
# some common sanity checks for commands
for command in comm_commands:
if len(command) >= 3 and [command[0], command[2]] == ['set', 'bantime']:
self.assertTrue(isinstance(command[3], int))
self.assertTrue(command[3] > 0)
# and we know even some of them by heart
for j in ['sshd', 'recidive']:
# by default we have 'auto' backend ATM