~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/commands/tests/test_help.py

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Additional tests for the `help` email command."""
19
19
 
20
 
from __future__ import absolute_import, print_function, unicode_literals
21
 
 
22
 
__metaclass__ = type
23
20
__all__ = [
 
21
    'TestHelp',
24
22
    ]
25
23
 
26
24
 
47
45
    def test_too_many_arguments(self):
48
46
        # Error message when too many help arguments are given.
49
47
        results = Results()
50
 
        status = self._help.process(self._mlist, Message(), {}, 
 
48
        status = self._help.process(self._mlist, Message(), {},
51
49
                                    ('more', 'than', 'one'),
52
50
                                    results)
53
51
        self.assertEqual(status, ContinueProcessing.no)
54
 
        self.assertEqual(unicode(results), """\
 
52
        self.assertEqual(str(results), """\
55
53
The results of your email command are provided below.
56
54
 
57
55
help: too many arguments: more than one
60
58
    def test_no_such_command(self):
61
59
        # Error message when asking for help on an existent command.
62
60
        results = Results()
63
 
        status = self._help.process(self._mlist, Message(), {}, 
 
61
        status = self._help.process(self._mlist, Message(), {},
64
62
                                    ('doesnotexist',), results)
65
63
        self.assertEqual(status, ContinueProcessing.no)
66
 
        self.assertEqual(unicode(results), """\
 
64
        self.assertEqual(str(results), """\
67
65
The results of your email command are provided below.
68
66
 
69
67
help: no such command: doesnotexist