diff options
Diffstat (limited to 'Mailman/tests')
| -rw-r--r-- | Mailman/tests/Makefile.in | 82 | ||||
| -rw-r--r-- | Mailman/tests/bounces/Makefile.in | 66 | ||||
| -rw-r--r-- | Mailman/tests/test_handlers.py | 3 | ||||
| -rw-r--r-- | Mailman/tests/test_membership.py | 6 | ||||
| -rw-r--r-- | Mailman/tests/test_security_mgr.py | 11 |
5 files changed, 154 insertions, 14 deletions
diff --git a/Mailman/tests/Makefile.in b/Mailman/tests/Makefile.in new file mode 100644 index 000000000..1326f67e5 --- /dev/null +++ b/Mailman/tests/Makefile.in @@ -0,0 +1,82 @@ +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/testing +SHELL= /bin/sh + +MODULES= *.py +OTHERFILES= testing.cfg.in + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + +# Directories make should decend into +SUBDIRS= bounces + +# Rules + +all: + +install: + for f in $(MODULES) $(OTHERFILES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile + @for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) distclean); \ + done diff --git a/Mailman/tests/bounces/Makefile.in b/Mailman/tests/bounces/Makefile.in new file mode 100644 index 000000000..0c9b2759b --- /dev/null +++ b/Mailman/tests/bounces/Makefile.in @@ -0,0 +1,66 @@ +# Copyright (C) 2001-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public Licenseo +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +BOUNCEDIR= $(prefix)/Mailman/testing/bounces +SHELL= /bin/sh + +BOUNCE_FILES= $(srcdir)/*.txt + + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + +# Rules +all: + +install: + for f in $(BOUNCE_FILES); \ + do \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(BOUNCEDIR); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile diff --git a/Mailman/tests/test_handlers.py b/Mailman/tests/test_handlers.py index b8b33ba1a..b4cb390ce 100644 --- a/Mailman/tests/test_handlers.py +++ b/Mailman/tests/test_handlers.py @@ -25,7 +25,6 @@ from Mailman import Message from Mailman import passwords from Mailman.MailList import MailList from Mailman.configuration import config -from Mailman.tests.base import TestBase from Mailman.Handlers import Approve # Don't test handlers such as SMTPDirect and Sendmail here @@ -37,7 +36,7 @@ def password(cleartext): -class TestApprove(TestBase): +class TestApprove(unittest.TestCase): def test_short_circuit(self): msgdata = {'approved': 1} rtn = Approve.process(self._mlist, None, msgdata) diff --git a/Mailman/tests/test_membership.py b/Mailman/tests/test_membership.py index c7f1773b8..b874ee67c 100644 --- a/Mailman/tests/test_membership.py +++ b/Mailman/tests/test_membership.py @@ -28,7 +28,6 @@ from Mailman import passwords from Mailman.Errors import NotAMemberError from Mailman.UserDesc import UserDesc from Mailman.configuration import config -from Mailman.tests.base import TestBase @@ -37,7 +36,7 @@ def password(cleartext): -class TestNoMembers(TestBase): +class TestNoMembers(unittest.TestCase): def test_no_member(self): eq = self.assertEqual raises = self.assertRaises @@ -81,9 +80,8 @@ class TestNoMembers(TestBase): -class TestMembers(TestBase): +class TestMembers(unittest.TestCase): def setUp(self): - TestBase.setUp(self) self._member_password = password('xxXXxx') self._mlist.addNewMember('person@dom.ain', digest=0, diff --git a/Mailman/tests/test_security_mgr.py b/Mailman/tests/test_security_mgr.py index 3d513562d..4a9a6919e 100644 --- a/Mailman/tests/test_security_mgr.py +++ b/Mailman/tests/test_security_mgr.py @@ -31,7 +31,6 @@ from Mailman import Errors from Mailman import Utils from Mailman import passwords from Mailman.configuration import config -from Mailman.tests.base import TestBase @@ -40,7 +39,7 @@ def password(cleartext): -class TestSecurityManager(TestBase): +class TestSecurityManager(unittest.TestCase): def test_init_vars(self): eq = self.assertEqual eq(self._mlist.mod_password, None) @@ -83,9 +82,8 @@ class TestSecurityManager(TestBase): -class TestAuthenticate(TestBase): +class TestAuthenticate(unittest.TestCase): def setUp(self): - TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=True) Utils.set_global_password('ccCCcc', siteadmin=False) @@ -98,7 +96,6 @@ class TestAuthenticate(TestBase): os.unlink(config.LISTCREATOR_PW_FILE) except OSError, e: if e.errno <> errno.ENOENT: raise - TestBase.tearDown(self) def test_auth_creator(self): self.assertEqual(self._mlist.Authenticate( @@ -171,9 +168,8 @@ class StripperIO(StringIO): StringIO.write(self, s) -class TestWebAuthenticate(TestBase): +class TestWebAuthenticate(unittest.TestCase): def setUp(self): - TestBase.setUp(self) Utils.set_global_password('bbBBbb', siteadmin=True) Utils.set_global_password('ccCCcc', siteadmin=False) mlist = self._mlist @@ -200,7 +196,6 @@ class TestWebAuthenticate(TestBase): except OSError, e: if e.errno <> errno.ENOENT: raise del os.environ['HTTP_COOKIE'] - TestBase.tearDown(self) def test_auth_site_admin(self): self.failUnless(self._mlist.WebAuthenticate( |
