4 Mailman can archive to any number of archivers that adhere to the IArchiver
5 interface. By default, there's a Pipermail archiver.
7 >>> from mailman.app.lifecycle import create_list
8 >>> mlist = create_list(u'test@example.com')
9 >>> mlist.web_page_url = u'http://www.example.com/'
10 >>> config.db.commit()
12 >>> msg = message_from_string("""\
13 ... From: aperson@example.com
14 ... To: test@example.com
15 ... Subject: My first post
16 ... Message-ID: <first>
21 >>> archiver_queue = config.switchboards['archive']
22 >>> ignore = archiver_queue.enqueue(msg, {}, listname=mlist.fqdn_listname)
24 >>> from mailman.queue.archive import ArchiveRunner
25 >>> from mailman.testing.helpers import make_testable_runner
26 >>> runner = make_testable_runner(ArchiveRunner)
29 # The best we can do is verify some landmark exists. Let's use the
30 # Pipermail pickle file exists.
31 >>> listname = mlist.fqdn_listname
33 >>> os.path.exists(os.path.join(
34 ... config.PUBLIC_ARCHIVE_FILE_DIR, listname, 'pipermail.pck'))