~raj-abhilash1/mailman/bugfix

« back to all changes in this revision

Viewing changes to src/mailman/runners/tests/test_archiver.py

  • Committer: Barry Warsaw
  • Date: 2012-04-26 02:08:22 UTC
  • Revision ID: barry@list.org-20120426020822-g5shyz6tr3gwkmiw
General code cleanup.

 - Add explicit dependency on zope.event in setup.py.
 - Use Python 3 compatible syntax for specifying that a class implements an
   interface, i.e. the @implementer class decorator.
 - print_function futures.
 - Whitespace normalization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import unittest
30
30
 
31
31
from email import message_from_file
32
 
from zope.interface import implements
 
32
from zope.interface import implementer
33
33
 
34
34
from mailman.app.lifecycle import create_list
35
35
from mailman.config import config
44
44
 
45
45
 
46
46
 
 
47
@implementer(IArchiver)
47
48
class DummyArchiver:
48
 
    implements(IArchiver)
49
49
    name = 'dummy'
50
50
 
51
51
    @staticmethod
193
193
        self.assertEqual(archived['x-original-date'],
194
194
                         'Mon, 01 Aug 2005 07:49:23 +0000')
195
195
 
196
 
    @configuration('archiver.dummy', 
 
196
    @configuration('archiver.dummy',
197
197
                   enable='yes', clobber_date='maybe', clobber_skew='1d')
198
198
    def test_clobber_date_maybe_when_insane(self):
199
199
        # The date is clobbered if it's farther off from now than its skew