From 687bebcd45f53166c21ec50baa384e4a2160ca39 Mon Sep 17 00:00:00 2001 From: "Stuart D. Gathman" Date: Tue, 26 Jul 2016 07:56:52 -0400 Subject: [PATCH] Merge fix test case from master --- doc/mainpage.py | 12 ++++++++++++ testutils.py | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/mainpage.py b/doc/mainpage.py index 1bfe25f..152a765 100644 --- a/doc/mainpage.py +++ b/doc/mainpage.py @@ -72,3 +72,15 @@ # pydspam wraps # the libdspam API of the DSPAM # project. +# +# @section Milters written with pymilter +# +# Verify Domain is a +# Postfix milter that rejects/fixes manipulated From: header +# on a mail host with multiple virtual domains. +# +# BMS Milter has several +# milters, a big complicated spam filter that integrates multiple +# authentication protocols with pydpsm, and two simple ones: spfmilter.py and +# dkim-milter.py. +# diff --git a/testutils.py b/testutils.py index 884ac60..d5a0b5f 100644 --- a/testutils.py +++ b/testutils.py @@ -11,7 +11,8 @@ class AddrCacheTestCase(unittest.TestCase): self.fname = 'test.dat' def tearDown(self): - os.remove(self.fname) + if os.path.exists(self.fname): + os.remove(self.fname) def testAdd(self): cache = AddrCache(fname=self.fname) @@ -41,7 +42,7 @@ class AddrCacheTestCase(unittest.TestCase): def testParseHeader(self): s='=?UTF-8?B?TGFzdCBGZXcgQ29sZHBsYXkgQWxidW0gQXJ0d29ya3MgQXZhaWxhYmxlAA?=' h = Milter.utils.parse_header(s) - self.assertEqual(s,'Last Few Coldplay Album Artworks Available\x00') + self.assertEqual(h,'Last Few Coldplay Album Artworks Available\x00') def suite(): s = unittest.makeSuite(AddrCacheTestCase,'test')