Commit dc68c4f9 authored by Barry Warsaw's avatar Barry Warsaw

Bump to version 3.0a5

Fix a test to use pkg_resources instead of open.
parent 2e2946ed
......@@ -7,6 +7,9 @@ Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
3.0 alpha 5 -- "Distant Early Warning"
======================================
3.0 alpha 4 -- "Vital Signs"
============================
(2009-11-28)
......
......@@ -30,10 +30,10 @@ import sys
import email
import unittest
import mailman.tests.bounces
from mailman.Bouncers.BouncerAPI import Stop
from contextlib import closing
from pkg_resources import resource_stream
MSGDIR = os.path.dirname(mailman.tests.bounces.__file__)
from mailman.Bouncers.BouncerAPI import Stop
......@@ -167,14 +167,16 @@ class BounceTest(unittest.TestCase):
# Done
)
def _getmsg(self, filename):
with closing(resource_stream('mailman.tests.bounces', filename)) as fp:
return email.message_from_file(fp)
def test_bounce(self):
for modname, filename, addrs in self.DATA:
module = 'mailman.Bouncers.' + modname
__import__(module)
# XXX Convert this tousing package resources
path = os.path.join(MSGDIR, filename)
with open(path) as fp:
msg = email.message_from_file(fp)
msg = self._getmsg(filename)
foundaddrs = sys.modules[module].process(msg)
# Some modules return None instead of [] for failure
if foundaddrs is None:
......@@ -190,8 +192,7 @@ class BounceTest(unittest.TestCase):
def test_SMTP32_failure(self):
from mailman.Bouncers import SMTP32
# This file has no X-Mailer: header
with open(os.path.join(MSGDIR, 'postfix_01.txt')) as fp:
msg = email.message_from_file(fp)
msg = self._getmsg('postfix_01.txt')
self.failIf(msg['x-mailer'] is not None)
self.failIf(SMTP32.process(msg))
......
......@@ -18,8 +18,8 @@
"""Mailman version strings."""
# Mailman version
VERSION = "3.0.0a4"
CODENAME = 'Vital Signs'
VERSION = "3.0.0a5"
CODENAME = 'Distant Early Warning'
# And as a hex number in the manner of PY_VERSION_HEX
ALPHA = 0xa
......@@ -34,7 +34,7 @@ MINOR_REV = 0
MICRO_REV = 0
REL_LEVEL = ALPHA
# at most 15 beta releases!
REL_SERIAL = 4
REL_SERIAL = 5
HEX_VERSION = ((MAJOR_REV << 24) | (MINOR_REV << 16) | (MICRO_REV << 8) |
(REL_LEVEL << 4) | (REL_SERIAL << 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment