summaryrefslogtreecommitdiff
path: root/src/mailman/rules/docs
diff options
context:
space:
mode:
authorBarry Warsaw2009-08-21 18:07:35 -0400
committerBarry Warsaw2009-08-21 18:07:35 -0400
commitd1718e1a1cc289344d2a68c7430c492a4a7966b6 (patch)
treed6b404e8544c83de5a3516a8206c7da92d9d088f /src/mailman/rules/docs
parentda566eb047608ed2e65c71dd25979f01c825c843 (diff)
downloadmailman-d1718e1a1cc289344d2a68c7430c492a4a7966b6.tar.gz
mailman-d1718e1a1cc289344d2a68c7430c492a4a7966b6.tar.zst
mailman-d1718e1a1cc289344d2a68c7430c492a4a7966b6.zip
Test updates and repair.xo
Diffstat (limited to 'src/mailman/rules/docs')
-rw-r--r--src/mailman/rules/docs/administrivia.txt3
-rw-r--r--src/mailman/rules/docs/approve.txt3
-rw-r--r--src/mailman/rules/docs/loop.txt3
-rw-r--r--src/mailman/rules/docs/max-size.txt3
-rw-r--r--src/mailman/rules/docs/moderation.txt3
-rw-r--r--src/mailman/rules/docs/news-moderation.txt3
-rw-r--r--src/mailman/rules/docs/no-subject.txt3
-rw-r--r--src/mailman/rules/docs/recipients.txt3
-rw-r--r--src/mailman/rules/docs/rules.txt3
-rw-r--r--src/mailman/rules/docs/suspicious.txt3
10 files changed, 20 insertions, 10 deletions
diff --git a/src/mailman/rules/docs/administrivia.txt b/src/mailman/rules/docs/administrivia.txt
index f43a31834..4da0a81b1 100644
--- a/src/mailman/rules/docs/administrivia.txt
+++ b/src/mailman/rules/docs/administrivia.txt
@@ -7,7 +7,8 @@ commands in the Subject header or first few lines of the payload. This is
used to catch messages posted to the list which should have been sent to the
-request robot address.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> mlist.administrivia = True
>>> rule = config.rules['administrivia']
>>> print rule.name
diff --git a/src/mailman/rules/docs/approve.txt b/src/mailman/rules/docs/approve.txt
index 8ae23b8f3..868827cf0 100644
--- a/src/mailman/rules/docs/approve.txt
+++ b/src/mailman/rules/docs/approve.txt
@@ -14,7 +14,8 @@ approval queue. This has several use cases:
In order to support this, a mailing list can be given a 'moderator password'
which is shared among all the administrators.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> mlist.moderator_password = 'abcxyz'
The 'approved' rule determines whether the message contains the proper
diff --git a/src/mailman/rules/docs/loop.txt b/src/mailman/rules/docs/loop.txt
index 5015d3d95..927df0e9b 100644
--- a/src/mailman/rules/docs/loop.txt
+++ b/src/mailman/rules/docs/loop.txt
@@ -5,7 +5,8 @@ Posting loops
To avoid a posting loop, Mailman has a rule to check for the existence of an
X-BeenThere header with the value of the list's posting address.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['loop']
>>> print rule.name
loop
diff --git a/src/mailman/rules/docs/max-size.txt b/src/mailman/rules/docs/max-size.txt
index a34c98627..264281b65 100644
--- a/src/mailman/rules/docs/max-size.txt
+++ b/src/mailman/rules/docs/max-size.txt
@@ -7,7 +7,8 @@ specified maximum. Generally this is used to prevent huge attachments from
getting posted to the list. This value is calculated in terms of KB (1024
bytes).
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['max-size']
>>> print rule.name
max-size
diff --git a/src/mailman/rules/docs/moderation.txt b/src/mailman/rules/docs/moderation.txt
index c4adcdf53..401e46605 100644
--- a/src/mailman/rules/docs/moderation.txt
+++ b/src/mailman/rules/docs/moderation.txt
@@ -7,7 +7,8 @@ postings, then only members with a cleared moderation flag will be able to
email the list without having those messages be held for approval. The
'moderation' rule determines whether the message should be moderated or not.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['moderation']
>>> print rule.name
moderation
diff --git a/src/mailman/rules/docs/news-moderation.txt b/src/mailman/rules/docs/news-moderation.txt
index 5658ccfef..269079505 100644
--- a/src/mailman/rules/docs/news-moderation.txt
+++ b/src/mailman/rules/docs/news-moderation.txt
@@ -9,7 +9,8 @@ posted to the newsgroup, and from there, gated to the mailing list. It's a
circuitous route, but it works nonetheless by holding all messages posted
directly to the mailing list.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['news-moderation']
>>> print rule.name
news-moderation
diff --git a/src/mailman/rules/docs/no-subject.txt b/src/mailman/rules/docs/no-subject.txt
index f9b3ece03..fa26006ef 100644
--- a/src/mailman/rules/docs/no-subject.txt
+++ b/src/mailman/rules/docs/no-subject.txt
@@ -5,7 +5,8 @@ No Subject header
This rule matches if the message has no Subject header, or if the header is
the empty string when stripped.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['no-subject']
>>> print rule.name
no-subject
diff --git a/src/mailman/rules/docs/recipients.txt b/src/mailman/rules/docs/recipients.txt
index e8c63b59a..724faa8ad 100644
--- a/src/mailman/rules/docs/recipients.txt
+++ b/src/mailman/rules/docs/recipients.txt
@@ -5,7 +5,8 @@ Maximum number of recipients
The 'max-recipients' rule matches when there are more than the maximum allowed
number of explicit recipients addressed by the message.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['max-recipients']
>>> print rule.name
max-recipients
diff --git a/src/mailman/rules/docs/rules.txt b/src/mailman/rules/docs/rules.txt
index 2836d10a1..a21816944 100644
--- a/src/mailman/rules/docs/rules.txt
+++ b/src/mailman/rules/docs/rules.txt
@@ -47,7 +47,8 @@ Individual rules can be checked to see if they match, by running the rule's
`check()` method. This returns a boolean indicating whether the rule was
matched or not.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> msg = message_from_string("""\
... From: aperson@example.com
...
diff --git a/src/mailman/rules/docs/suspicious.txt b/src/mailman/rules/docs/suspicious.txt
index 79d3eeea5..59b4493c4 100644
--- a/src/mailman/rules/docs/suspicious.txt
+++ b/src/mailman/rules/docs/suspicious.txt
@@ -6,7 +6,8 @@ Suspicious headers are a way for Mailman to hold messages that match a
particular regular expression. This mostly historical feature is fairly
confusing to users, and the list attribute that controls this is misnamed.
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> from mailman.app.lifecycle import create_list
+ >>> mlist = create_list('_xtest@example.com')
>>> rule = config.rules['suspicious-header']
>>> print rule.name
suspicious-header