Merge fix test case from master

This commit is contained in:
Stuart D. Gathman
2016-07-26 07:56:52 -04:00
parent 67d974638a
commit 687bebcd45
2 changed files with 15 additions and 2 deletions
+12
View File
@@ -72,3 +72,15 @@
# <a href="https://pypi.python.org/pypi/pydspam/">pydspam</a> wraps # <a href="https://pypi.python.org/pypi/pydspam/">pydspam</a> wraps
# the libdspam API of the <a href="http://dspam.sourceforge.net/">DSPAM</a> # the libdspam API of the <a href="http://dspam.sourceforge.net/">DSPAM</a>
# project. # project.
#
# @section Milters written with pymilter
#
# <a href="https://github.com/croessner/vrfydmn">Verify Domain</a> is a
# Postfix milter that rejects/fixes manipulated From: header
# on a mail host with multiple virtual domains.
#
# <a href="https://pypi.python.org/pypi/milter/">BMS Milter</a> 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.
#
+3 -2
View File
@@ -11,7 +11,8 @@ class AddrCacheTestCase(unittest.TestCase):
self.fname = 'test.dat' self.fname = 'test.dat'
def tearDown(self): def tearDown(self):
os.remove(self.fname) if os.path.exists(self.fname):
os.remove(self.fname)
def testAdd(self): def testAdd(self):
cache = AddrCache(fname=self.fname) cache = AddrCache(fname=self.fname)
@@ -41,7 +42,7 @@ class AddrCacheTestCase(unittest.TestCase):
def testParseHeader(self): def testParseHeader(self):
s='=?UTF-8?B?TGFzdCBGZXcgQ29sZHBsYXkgQWxidW0gQXJ0d29ya3MgQXZhaWxhYmxlAA?=' s='=?UTF-8?B?TGFzdCBGZXcgQ29sZHBsYXkgQWxidW0gQXJ0d29ya3MgQXZhaWxhYmxlAA?='
h = Milter.utils.parse_header(s) 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(): def suite():
s = unittest.makeSuite(AddrCacheTestCase,'test') s = unittest.makeSuite(AddrCacheTestCase,'test')