summaryrefslogtreecommitdiff
path: root/mailman/pipeline
diff options
context:
space:
mode:
authorBarry Warsaw2008-12-22 23:26:58 -0500
committerBarry Warsaw2008-12-22 23:26:58 -0500
commitfd600d3952393dc9808fefb9be871f78cdbdff39 (patch)
tree1c404608ccfbe640a3816859d3257025b0c4b353 /mailman/pipeline
parentdfccf2b7d2b5749c86267645aaf870f128dab2d8 (diff)
downloadmailman-fd600d3952393dc9808fefb9be871f78cdbdff39.tar.gz
mailman-fd600d3952393dc9808fefb9be871f78cdbdff39.tar.zst
mailman-fd600d3952393dc9808fefb9be871f78cdbdff39.zip
Convert more configuration variables to lazr.config.
Add .push() and .pop() methods to the Configuration object. Put the 'config' object in the globals of doctests. Add some test layers for setting up the configuration and the SMTP server.
Diffstat (limited to 'mailman/pipeline')
-rw-r--r--mailman/pipeline/docs/ack-headers.txt1
-rw-r--r--mailman/pipeline/docs/acknowledge.txt1
-rw-r--r--mailman/pipeline/docs/after-delivery.txt1
-rw-r--r--mailman/pipeline/docs/archives.txt1
-rw-r--r--mailman/pipeline/docs/avoid-duplicates.txt1
-rw-r--r--mailman/pipeline/docs/calc-recips.txt1
-rw-r--r--mailman/pipeline/docs/cleanse.txt1
-rw-r--r--mailman/pipeline/docs/cook-headers.txt1
-rw-r--r--mailman/pipeline/docs/decorate.txt1
-rw-r--r--mailman/pipeline/docs/digests.txt1
-rw-r--r--mailman/pipeline/docs/file-recips.txt1
-rw-r--r--mailman/pipeline/docs/filtering.txt1
-rw-r--r--mailman/pipeline/docs/nntp.txt1
-rw-r--r--mailman/pipeline/docs/reply-to.txt1
-rw-r--r--mailman/pipeline/docs/replybot.txt1
-rw-r--r--mailman/pipeline/docs/scrubber.txt1
-rw-r--r--mailman/pipeline/docs/subject-munging.txt1
-rw-r--r--mailman/pipeline/docs/tagger.txt1
-rw-r--r--mailman/pipeline/docs/to-outgoing.txt1
19 files changed, 0 insertions, 19 deletions
diff --git a/mailman/pipeline/docs/ack-headers.txt b/mailman/pipeline/docs/ack-headers.txt
index 28a8eed9e..ca41df03e 100644
--- a/mailman/pipeline/docs/ack-headers.txt
+++ b/mailman/pipeline/docs/ack-headers.txt
@@ -7,7 +7,6 @@ transformations. Some headers get added, others get changed. Some of these
changes depend on mailing list settings and others depend on how the message
is getting sent through the system. We'll take things one-by-one.
- >>> from mailman.configuration import config
>>> from mailman.pipeline.cook_headers import process
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.subject_prefix = u''
diff --git a/mailman/pipeline/docs/acknowledge.txt b/mailman/pipeline/docs/acknowledge.txt
index 76c8fdf21..ccbb70e79 100644
--- a/mailman/pipeline/docs/acknowledge.txt
+++ b/mailman/pipeline/docs/acknowledge.txt
@@ -5,7 +5,6 @@ When a user posts a message to a mailing list, and that user has chosen to
receive acknowledgments of their postings, Mailman will sent them such an
acknowledgment.
- >>> from mailman.configuration import config
>>> handler = config.handlers['acknowledge']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.real_name = u'XTest'
diff --git a/mailman/pipeline/docs/after-delivery.txt b/mailman/pipeline/docs/after-delivery.txt
index 5bc9b5936..b910e89a6 100644
--- a/mailman/pipeline/docs/after-delivery.txt
+++ b/mailman/pipeline/docs/after-delivery.txt
@@ -6,7 +6,6 @@ by the rest of the handlers in the incoming queue pipeline, a couple of
bookkeeping pieces of information are updated.
>>> import datetime
- >>> from mailman.configuration import config
>>> handler = config.handlers['after-delivery']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> post_time = datetime.datetime.now() - datetime.timedelta(minutes=10)
diff --git a/mailman/pipeline/docs/archives.txt b/mailman/pipeline/docs/archives.txt
index 67ad45c89..9595a36e0 100644
--- a/mailman/pipeline/docs/archives.txt
+++ b/mailman/pipeline/docs/archives.txt
@@ -8,7 +8,6 @@ archivers to work in a separate process from the main Mailman delivery
processes.
>>> from mailman.app.lifecycle import create_list
- >>> from mailman.configuration import config
>>> from mailman.queue import Switchboard
>>> handler = config.handlers['to-archive']
>>> mlist = create_list(u'_xtest@example.com')
diff --git a/mailman/pipeline/docs/avoid-duplicates.txt b/mailman/pipeline/docs/avoid-duplicates.txt
index 9fd332d1b..e1d31716a 100644
--- a/mailman/pipeline/docs/avoid-duplicates.txt
+++ b/mailman/pipeline/docs/avoid-duplicates.txt
@@ -6,7 +6,6 @@ reduce the reception of duplicate messages. It does this by removing certain
recipients from the list of recipients that earlier handler modules
(e.g. CalcRecips) calculates.
- >>> from mailman.configuration import config
>>> handler = config.handlers['avoid-duplicates']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
diff --git a/mailman/pipeline/docs/calc-recips.txt b/mailman/pipeline/docs/calc-recips.txt
index 057351873..550edff51 100644
--- a/mailman/pipeline/docs/calc-recips.txt
+++ b/mailman/pipeline/docs/calc-recips.txt
@@ -5,7 +5,6 @@ Every message that makes it through to the list membership gets sent to a set
of recipient addresses. These addresses are calculated by one of the handler
modules and depends on a host of factors.
- >>> from mailman.configuration import config
>>> handler = config.handlers['calculate-recipients']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
diff --git a/mailman/pipeline/docs/cleanse.txt b/mailman/pipeline/docs/cleanse.txt
index 1597095b3..0940cdb4b 100644
--- a/mailman/pipeline/docs/cleanse.txt
+++ b/mailman/pipeline/docs/cleanse.txt
@@ -5,7 +5,6 @@ All messages posted to a list get their headers cleansed. Some headers are
related to additional permissions that can be granted to the message and other
headers can be used to fish for membership.
- >>> from mailman.configuration import config
>>> handler = config.handlers['cleanse']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
diff --git a/mailman/pipeline/docs/cook-headers.txt b/mailman/pipeline/docs/cook-headers.txt
index 4fbdf58bb..985214079 100644
--- a/mailman/pipeline/docs/cook-headers.txt
+++ b/mailman/pipeline/docs/cook-headers.txt
@@ -8,7 +8,6 @@ changes depend on mailing list settings and others depend on how the message
is getting sent through the system. We'll take things one-by-one.
>>> from mailman.pipeline.cook_headers import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.subject_prefix = u''
>>> mlist.include_list_post_header = False
diff --git a/mailman/pipeline/docs/decorate.txt b/mailman/pipeline/docs/decorate.txt
index 60afb0170..b805e23cf 100644
--- a/mailman/pipeline/docs/decorate.txt
+++ b/mailman/pipeline/docs/decorate.txt
@@ -6,7 +6,6 @@ original message. A handler module takes care of this based on the settings
of the mailing list and the type of message being processed.
>>> from mailman.pipeline.decorate import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> msg_text = """\
... From: aperson@example.org
diff --git a/mailman/pipeline/docs/digests.txt b/mailman/pipeline/docs/digests.txt
index df01379b9..f478c1ec0 100644
--- a/mailman/pipeline/docs/digests.txt
+++ b/mailman/pipeline/docs/digests.txt
@@ -8,7 +8,6 @@ digests, although only two are currently supported: MIME digests and RFC 1153
>>> from mailman.pipeline.to_digest import process
>>> from mailman.queue import Switchboard
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.preferred_language = u'en'
>>> mlist.web_page_url = u'http://www.example.com/'
diff --git a/mailman/pipeline/docs/file-recips.txt b/mailman/pipeline/docs/file-recips.txt
index e93bba9aa..d006151ba 100644
--- a/mailman/pipeline/docs/file-recips.txt
+++ b/mailman/pipeline/docs/file-recips.txt
@@ -5,7 +5,6 @@ Mailman can calculate the recipients for a message from a Sendmail-style
include file. This file must be called members.txt and it must live in the
list's data directory.
- >>> from mailman.configuration import config
>>> handler = config.handlers['file-recipients']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
diff --git a/mailman/pipeline/docs/filtering.txt b/mailman/pipeline/docs/filtering.txt
index c5dca1531..70ca3098d 100644
--- a/mailman/pipeline/docs/filtering.txt
+++ b/mailman/pipeline/docs/filtering.txt
@@ -7,7 +7,6 @@ message. It does this with the MimeDel handler module, although other
handlers can potentially do other kinds of finer level content filtering.
>>> from mailman.pipeline.mime_delete import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.preferred_language = u'en'
diff --git a/mailman/pipeline/docs/nntp.txt b/mailman/pipeline/docs/nntp.txt
index 5652d7924..3ef3b2413 100644
--- a/mailman/pipeline/docs/nntp.txt
+++ b/mailman/pipeline/docs/nntp.txt
@@ -6,7 +6,6 @@ be forwarded onto an NNTP newsgroup. Typically this means Usenet, but since
NNTP is to Usenet as IP is to the web, it's more general than that.
>>> from mailman.queue import Switchboard
- >>> from mailman.configuration import config
>>> handler = config.handlers['to-usenet']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.preferred_language = u'en'
diff --git a/mailman/pipeline/docs/reply-to.txt b/mailman/pipeline/docs/reply-to.txt
index ad9100ce1..570ffb7ea 100644
--- a/mailman/pipeline/docs/reply-to.txt
+++ b/mailman/pipeline/docs/reply-to.txt
@@ -8,7 +8,6 @@ changes depend on mailing list settings and others depend on how the message
is getting sent through the system. We'll take things one-by-one.
>>> from mailman.pipeline.cook_headers import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.subject_prefix = u''
diff --git a/mailman/pipeline/docs/replybot.txt b/mailman/pipeline/docs/replybot.txt
index 2e3765cab..7325417ed 100644
--- a/mailman/pipeline/docs/replybot.txt
+++ b/mailman/pipeline/docs/replybot.txt
@@ -7,7 +7,6 @@ responses are subject to various conditions, such as headers in the original
message or the amount of time since the last auto-response.
>>> from mailman.pipeline.replybot import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.real_name = u'XTest'
>>> mlist.web_page_url = u'http://www.example.com/'
diff --git a/mailman/pipeline/docs/scrubber.txt b/mailman/pipeline/docs/scrubber.txt
index 744925f34..9c9367cda 100644
--- a/mailman/pipeline/docs/scrubber.txt
+++ b/mailman/pipeline/docs/scrubber.txt
@@ -7,7 +7,6 @@ scrub attachments from messages so that binary goop doesn't end up in an
archive message.
>>> from mailman.pipeline.scrubber import process, save_attachment
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.preferred_language = u'en'
diff --git a/mailman/pipeline/docs/subject-munging.txt b/mailman/pipeline/docs/subject-munging.txt
index 02677d6e2..b2972683b 100644
--- a/mailman/pipeline/docs/subject-munging.txt
+++ b/mailman/pipeline/docs/subject-munging.txt
@@ -8,7 +8,6 @@ changes depend on mailing list settings and others depend on how the message
is getting sent through the system. We'll take things one-by-one.
>>> from mailman.pipeline.cook_headers import process
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.subject_prefix = u''
diff --git a/mailman/pipeline/docs/tagger.txt b/mailman/pipeline/docs/tagger.txt
index 778f7cc73..64996755b 100644
--- a/mailman/pipeline/docs/tagger.txt
+++ b/mailman/pipeline/docs/tagger.txt
@@ -10,7 +10,6 @@ expressions. The message then gets tagged with the topic names of each hit.
>>> from mailman.pipeline.tagger import process
>>> from mailman.queue import Switchboard
- >>> from mailman.configuration import config
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
Topics must be enabled for Mailman to do any topic matching, even if topics
diff --git a/mailman/pipeline/docs/to-outgoing.txt b/mailman/pipeline/docs/to-outgoing.txt
index 3840b71ee..70f93cfae 100644
--- a/mailman/pipeline/docs/to-outgoing.txt
+++ b/mailman/pipeline/docs/to-outgoing.txt
@@ -10,7 +10,6 @@ basically describes how to encode the recipient's address in the originator
headers for unambigous bounce processing.
>>> from mailman.queue import Switchboard
- >>> from mailman.configuration import config
>>> handler = config.handlers['to-outgoing']
>>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> switchboard = Switchboard(config.OUTQUEUE_DIR)