summaryrefslogtreecommitdiff
path: root/src/mailman/archiving/tests
diff options
context:
space:
mode:
authorBarry Warsaw2012-04-22 16:18:59 -0400
committerBarry Warsaw2012-04-22 16:18:59 -0400
commitd64b2c1aa557b815fcc1277ebcf13ce52834b836 (patch)
treed10a16b6bb4236719284b6073ad307537bb9169f /src/mailman/archiving/tests
parent0a942a671a06d65b6355b383a5d140dc93ad9587 (diff)
downloadmailman-d64b2c1aa557b815fcc1277ebcf13ce52834b836.tar.gz
mailman-d64b2c1aa557b815fcc1277ebcf13ce52834b836.tar.zst
mailman-d64b2c1aa557b815fcc1277ebcf13ce52834b836.zip
- Module modernization by adding the print_function() import.
- Update many tests to use the transaction() context manager.
Diffstat (limited to 'src/mailman/archiving/tests')
-rw-r--r--src/mailman/archiving/tests/test_prototype.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/archiving/tests/test_prototype.py b/src/mailman/archiving/tests/test_prototype.py
index 29f6ba1cb..bc1cee8b9 100644
--- a/src/mailman/archiving/tests/test_prototype.py
+++ b/src/mailman/archiving/tests/test_prototype.py
@@ -37,6 +37,7 @@ from flufl.lock import Lock
from mailman.app.lifecycle import create_list
from mailman.archiving.prototype import Prototype
from mailman.config import config
+from mailman.database.transaction import transaction
from mailman.testing.helpers import LogFileMark
from mailman.testing.helpers import (
specialized_message_from_string as mfs)
@@ -61,8 +62,8 @@ X-Message-ID-Hash: MS6QLWERIJLGCRF44J7USBFDELMNT2BW
Tests are better than no tests
but the water deserves to be swum.
""")
- self._mlist = create_list('test@example.com')
- config.db.commit()
+ with transaction():
+ self._mlist = create_list('test@example.com')
# Set up a temporary directory for the prototype archiver so that it's
# easier to clean up.
self._tempdir = tempfile.mkdtemp()