mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
TST: Fix test failing due to wrapping of long subject lines v2
Another fix based from c7df15f014 which
failed due to python3.3 not wrapping headers to 78 characters.
This commit is contained in:
parent
c7df15f014
commit
41de7ca879
1 changed files with 3 additions and 5 deletions
|
|
@ -101,11 +101,9 @@ class SMTPActionTest(unittest.TestCase):
|
|||
self.action.ban(aInfo)
|
||||
self.assertEqual(self.smtpd.mailfrom, "fail2ban")
|
||||
self.assertEqual(self.smtpd.rcpttos, ["root"])
|
||||
subject = "\n".join(wrap(
|
||||
"Subject: [Fail2Ban] %s: banned %s" %
|
||||
(self.jail.name, aInfo['ip']),
|
||||
78, subsequent_indent=" "))
|
||||
self.assertTrue(subject in self.smtpd.data)
|
||||
subject = "Subject: [Fail2Ban] %s: banned %s" % (
|
||||
self.jail.name, aInfo['ip'])
|
||||
self.assertTrue(subject in self.smtpd.data.replace("\n", ""))
|
||||
self.assertTrue(
|
||||
"%i attempts" % aInfo['failures'] in self.smtpd.data)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue