diff options
| author | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
| commit | 4a612db8e89afed74173b93f3b64fa567b8417a3 (patch) | |
| tree | 81a687d113079a25f93279f35c7eee2aa2572510 /src/mailman/commands/tests | |
| parent | 84af79988a4e916604cba31843778206efb7d1b8 (diff) | |
| parent | de181c1a40965a3a7deedd56a034a946f45b6984 (diff) | |
| download | mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.gz mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.zst mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.zip | |
Diffstat (limited to 'src/mailman/commands/tests')
| -rw-r--r-- | src/mailman/commands/tests/test_conf.py | 5 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_confirm.py | 6 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_control.py | 5 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_create.py | 3 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_help.py | 12 |
5 files changed, 8 insertions, 23 deletions
diff --git a/src/mailman/commands/tests/test_conf.py b/src/mailman/commands/tests/test_conf.py index 12ed5c537..07036df3a 100644 --- a/src/mailman/commands/tests/test_conf.py +++ b/src/mailman/commands/tests/test_conf.py @@ -17,9 +17,6 @@ """Test the conf subcommand.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'TestConf', ] @@ -31,9 +28,9 @@ import mock import tempfile import unittest -from StringIO import StringIO from mailman.commands.cli_conf import Conf from mailman.testing.layers import ConfigLayer +from six import StringIO diff --git a/src/mailman/commands/tests/test_confirm.py b/src/mailman/commands/tests/test_confirm.py index 19a9068bc..f067a2a0a 100644 --- a/src/mailman/commands/tests/test_confirm.py +++ b/src/mailman/commands/tests/test_confirm.py @@ -17,9 +17,6 @@ """Test the `confirm` command.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'TestConfirm', ] @@ -27,8 +24,6 @@ __all__ = [ import unittest -from zope.component import getUtility - from mailman.app.lifecycle import create_list from mailman.commands.eml_confirm import Confirm from mailman.email.message import Message @@ -37,6 +32,7 @@ from mailman.interfaces.registrar import IRegistrar from mailman.runners.command import Results from mailman.testing.helpers import get_queue_messages, reset_the_world from mailman.testing.layers import ConfigLayer +from zope.component import getUtility diff --git a/src/mailman/commands/tests/test_control.py b/src/mailman/commands/tests/test_control.py index 0847d86b1..299f0da25 100644 --- a/src/mailman/commands/tests/test_control.py +++ b/src/mailman/commands/tests/test_control.py @@ -17,9 +17,6 @@ """Test some additional corner cases for starting/stopping.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'TestStart', 'find_master', @@ -37,11 +34,11 @@ import socket import unittest from datetime import timedelta, datetime - from mailman.commands.cli_control import Start, kill_watcher from mailman.config import config from mailman.testing.layers import ConfigLayer + SEP = '|' diff --git a/src/mailman/commands/tests/test_create.py b/src/mailman/commands/tests/test_create.py index c2dffb929..47808c997 100644 --- a/src/mailman/commands/tests/test_create.py +++ b/src/mailman/commands/tests/test_create.py @@ -17,9 +17,6 @@ """Test `bin/mailman create`.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'TestCreate', ] diff --git a/src/mailman/commands/tests/test_help.py b/src/mailman/commands/tests/test_help.py index 3c7d1ae9f..b2de0297d 100644 --- a/src/mailman/commands/tests/test_help.py +++ b/src/mailman/commands/tests/test_help.py @@ -17,10 +17,8 @@ """Additional tests for the `help` email command.""" -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ + 'TestHelp', ] @@ -47,11 +45,11 @@ class TestHelp(unittest.TestCase): def test_too_many_arguments(self): # Error message when too many help arguments are given. results = Results() - status = self._help.process(self._mlist, Message(), {}, + status = self._help.process(self._mlist, Message(), {}, ('more', 'than', 'one'), results) self.assertEqual(status, ContinueProcessing.no) - self.assertEqual(unicode(results), """\ + self.assertEqual(str(results), """\ The results of your email command are provided below. help: too many arguments: more than one @@ -60,10 +58,10 @@ help: too many arguments: more than one def test_no_such_command(self): # Error message when asking for help on an existent command. results = Results() - status = self._help.process(self._mlist, Message(), {}, + status = self._help.process(self._mlist, Message(), {}, ('doesnotexist',), results) self.assertEqual(status, ContinueProcessing.no) - self.assertEqual(unicode(results), """\ + self.assertEqual(str(results), """\ The results of your email command are provided below. help: no such command: doesnotexist |
