~msapiro/mailman/precedence-fix

« back to all changes in this revision

Viewing changes to src/mailman/app/tests/test_moderation.py

  • Committer: Barry Warsaw
  • Date: 2012-03-13 05:13:13 UTC
  • Revision ID: barry@list.org-20120313051313-jy6xkqzu19zjf139
 * Fix `test_moderation` for timezones East of UTC+0000, given by blacktav.
   (LP: #890675)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Moderation tests."""
19
19
 
20
 
from __future__ import absolute_import, unicode_literals
 
20
from __future__ import absolute_import, print_function, unicode_literals
21
21
 
22
22
__metaclass__ = type
23
23
__all__ = [
 
24
    'TestModeration',
24
25
    ]
25
26
 
26
27
 
79
80
        self.assertTrue('x-peer' in message)
80
81
        # The X-Mailman-Approved-At header has local timezone information in
81
82
        # it, so test that separately.
82
 
        self.assertEqual(message['x-mailman-approved-at'][:-4],
83
 
                         'Mon, 01 Aug 2005 07:49:23 -')
 
83
        self.assertEqual(message['x-mailman-approved-at'][:-5],
 
84
                         'Mon, 01 Aug 2005 07:49:23 ')
84
85
        del message['x-mailman-approved-at']
85
86
        # The Message-ID matches the original.
86
87
        self.assertEqual(message['message-id'], '<alpha>')