summaryrefslogtreecommitdiff
path: root/src/mailman/queue/docs
diff options
context:
space:
mode:
authorBarry Warsaw2009-07-21 07:07:58 -0400
committerBarry Warsaw2009-07-21 07:07:58 -0400
commit95163b905be9c912f640b07353451013bd6020a7 (patch)
treedee1520ef7595ef9baa1f7aff2fc35f1b32e8a23 /src/mailman/queue/docs
parentbf1204e9c920588adf649033d5db02bb7d75d640 (diff)
downloadmailman-95163b905be9c912f640b07353451013bd6020a7.tar.gz
mailman-95163b905be9c912f640b07353451013bd6020a7.tar.zst
mailman-95163b905be9c912f640b07353451013bd6020a7.zip
Expose 'transaction' as an alias for config.db in the doctest globs. This
means commit() is now transaction.commit() in doctests. Add tests of extended domain creation, which exposes the need to unlock the database (via transaction.abort()) so that the foreground test process doesn't lock the background REST server process.
Diffstat (limited to 'src/mailman/queue/docs')
-rw-r--r--src/mailman/queue/docs/archiver.txt2
-rw-r--r--src/mailman/queue/docs/lmtp.txt3
-rw-r--r--src/mailman/queue/docs/outgoing.txt2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman/queue/docs/archiver.txt b/src/mailman/queue/docs/archiver.txt
index 7d404cf56..e79eb6839 100644
--- a/src/mailman/queue/docs/archiver.txt
+++ b/src/mailman/queue/docs/archiver.txt
@@ -7,7 +7,7 @@ interface. By default, there's a Pipermail archiver.
>>> from mailman.app.lifecycle import create_list
>>> mlist = create_list('test@example.com')
- >>> commit()
+ >>> transaction.commit()
>>> msg = message_from_string("""\
... From: aperson@example.com
diff --git a/src/mailman/queue/docs/lmtp.txt b/src/mailman/queue/docs/lmtp.txt
index b8b6335fb..d4509aee7 100644
--- a/src/mailman/queue/docs/lmtp.txt
+++ b/src/mailman/queue/docs/lmtp.txt
@@ -48,7 +48,8 @@ Once the mailing list is created, the posting address is valid.
>>> from mailman.app.lifecycle import create_list
>>> create_list('mylist@example.com')
<mailing list "mylist@example.com" at ...>
- >>> commit()
+
+ >>> transaction.commit()
>>> lmtp.sendmail(
... 'anne.person@example.com',
... ['mylist@example.com'], """\
diff --git a/src/mailman/queue/docs/outgoing.txt b/src/mailman/queue/docs/outgoing.txt
index b8cf25033..b121fe716 100644
--- a/src/mailman/queue/docs/outgoing.txt
+++ b/src/mailman/queue/docs/outgoing.txt
@@ -28,7 +28,7 @@ unique copy of the message, with certain headers tailored for that recipient.
>>> from mailman.interfaces.mailinglist import Personalization
>>> mlist.personalize = Personalization.individual
- >>> commit()
+ >>> transaction.commit()
>>> msg = message_from_string("""\
... From: aperson@example.com