summaryrefslogtreecommitdiff
path: root/Mailman/tests
diff options
context:
space:
mode:
authorBarry Warsaw2015-04-28 18:57:43 -0400
committerBarry Warsaw2015-04-28 18:57:43 -0400
commitd52a7f13baccecadd5d298d5f12190fae474024f (patch)
tree0e849c2f9f552586751257933c4d5a5b32f8481c /Mailman/tests
parent5bd0f593724f9a696bbefc91ea9c2127b66fa231 (diff)
downloadmailman-d52a7f13baccecadd5d298d5f12190fae474024f.tar.gz
mailman-d52a7f13baccecadd5d298d5f12190fae474024f.tar.zst
mailman-d52a7f13baccecadd5d298d5f12190fae474024f.zip
Convert from bzr to git.
Diffstat (limited to 'Mailman/tests')
-rw-r--r--Mailman/tests/Makefile.in82
-rw-r--r--Mailman/tests/base.py81
-rw-r--r--Mailman/tests/bounces/Makefile.in66
3 files changed, 0 insertions, 229 deletions
diff --git a/Mailman/tests/Makefile.in b/Mailman/tests/Makefile.in
deleted file mode 100644
index 1326f67e5..000000000
--- a/Mailman/tests/Makefile.in
+++ /dev/null
@@ -1,82 +0,0 @@
-# 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/base.py b/Mailman/tests/base.py
deleted file mode 100644
index 562443b1e..000000000
--- a/Mailman/tests/base.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# 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 License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-# USA.
-
-"""Test base class which handles creating and deleting a test list."""
-
-import os
-import grp
-import new
-import pwd
-import sys
-import stat
-import shutil
-import difflib
-import tempfile
-import unittest
-
-from cStringIO import StringIO
-from sqlalchemy.orm import clear_mappers
-
-from Mailman import MailList
-from Mailman import Utils
-from Mailman.bin import rmlist
-from Mailman.configuration import config
-from Mailman.database.dbcontext import dbcontext
-
-NL = '\n'
-
-
-
-class TestBase(unittest.TestCase):
- def ndiffAssertEqual(self, first, second):
- """Like failUnlessEqual except use ndiff for readable output."""
- if first <> second:
- sfirst = str(first)
- ssecond = str(second)
- diff = difflib.ndiff(sfirst.splitlines(), ssecond.splitlines())
- fp = StringIO()
- print >> fp, NL, NL.join(diff)
- raise self.failureException(fp.getvalue())
-
- def setUp(self):
- # Be sure to close the connection to the current database, and then
- # reconnect to the new temporary SQLite database. Otherwise we end up
- # with turds in the main database and our qrunner subprocesses won't
- # find the mailing list. Because our global config object's
- # SQLALCHEMY_ENGINE_URL variable has already been updated, the
- # connect() call will open the database file the qrunners will be
- # rendezvousing on.
- dbcontext.close()
- clear_mappers()
- dbcontext.connect()
- mlist = MailList.MailList()
- mlist.Create('_xtest@example.com', 'owner@example.com', 'xxxxx')
- mlist.Save()
- # This leaves the list in a locked state
- self._mlist = mlist
-
- def tearDown(self):
- self._mlist.Unlock()
- rmlist.delete_list(self._mlist.fqdn_listname, self._mlist,
- archives=True, quiet=True)
- # Clear out any site locks, which can be left over if tests fail.
- for filename in os.listdir(config.LOCK_DIR):
- if filename.startswith('<site>'):
- path = os.path.join(config.LOCK_DIR, filename)
- print >> sys.stderr, '@@@@@ removing:', path
- os.unlink(path)
diff --git a/Mailman/tests/bounces/Makefile.in b/Mailman/tests/bounces/Makefile.in
deleted file mode 100644
index 0c9b2759b..000000000
--- a/Mailman/tests/bounces/Makefile.in
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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