summaryrefslogtreecommitdiff
path: root/src/mailman/runners/tests/test_confirm.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-07-06 21:08:41 -0400
committerBarry Warsaw2012-07-06 21:08:41 -0400
commit8d8ab1655b51e277570005b445d3b014afcfbc57 (patch)
tree6ba0147d975636e129a787c9dfa64dae8cffae89 /src/mailman/runners/tests/test_confirm.py
parentcd3f84b301c2150fea5402129a2e7bc862fbb52b (diff)
parent01415190ab44e69a8f09a6411564a7cb288404e8 (diff)
downloadmailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.gz
mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.zst
mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.zip
Diffstat (limited to 'src/mailman/runners/tests/test_confirm.py')
-rw-r--r--src/mailman/runners/tests/test_confirm.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mailman/runners/tests/test_confirm.py b/src/mailman/runners/tests/test_confirm.py
index d2b24a2d1..62171979c 100644
--- a/src/mailman/runners/tests/test_confirm.py
+++ b/src/mailman/runners/tests/test_confirm.py
@@ -32,6 +32,7 @@ from zope.component import getUtility
from mailman.app.lifecycle import create_list
from mailman.config import config
+from mailman.database.transaction import transaction
from mailman.interfaces.registrar import IRegistrar
from mailman.interfaces.usermanager import IUserManager
from mailman.runners.command import CommandRunner
@@ -50,14 +51,14 @@ class TestConfirm(unittest.TestCase):
layer = ConfigLayer
def setUp(self):
- # Register a subscription requiring confirmation.
registrar = getUtility(IRegistrar)
- self._mlist = create_list('test@example.com')
- self._mlist.send_welcome_message = False
- self._token = registrar.register(self._mlist, 'anne@example.org')
self._commandq = config.switchboards['command']
self._runner = make_testable_runner(CommandRunner, 'command')
- config.db.commit()
+ with transaction():
+ # Register a subscription requiring confirmation.
+ self._mlist = create_list('test@example.com')
+ self._mlist.send_welcome_message = False
+ self._token = registrar.register(self._mlist, 'anne@example.org')
def test_confirm_with_re_prefix(self):
subject = 'Re: confirm {0}'.format(self._token)