summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_users.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/rest/tests/test_users.py
parentcd3f84b301c2150fea5402129a2e7bc862fbb52b (diff)
parent01415190ab44e69a8f09a6411564a7cb288404e8 (diff)
downloadmailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.gz
mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.tar.zst
mailman-8d8ab1655b51e277570005b445d3b014afcfbc57.zip
Diffstat (limited to 'src/mailman/rest/tests/test_users.py')
-rw-r--r--src/mailman/rest/tests/test_users.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman/rest/tests/test_users.py b/src/mailman/rest/tests/test_users.py
index 1630eb96a..301027885 100644
--- a/src/mailman/rest/tests/test_users.py
+++ b/src/mailman/rest/tests/test_users.py
@@ -21,6 +21,7 @@ from __future__ import absolute_import, print_function, unicode_literals
__metaclass__ = type
__all__ = [
+ 'TestUsers',
]
@@ -29,7 +30,7 @@ import unittest
from urllib2 import HTTPError
from mailman.app.lifecycle import create_list
-from mailman.config import config
+from mailman.database.transaction import transaction
from mailman.testing.helpers import call_api
from mailman.testing.layers import RESTLayer
@@ -39,8 +40,8 @@ class TestUsers(unittest.TestCase):
layer = RESTLayer
def setUp(self):
- self._mlist = create_list('test@example.com')
- config.db.commit()
+ with transaction():
+ self._mlist = create_list('test@example.com')
def test_delete_bogus_user(self):
# Try to delete a user that does not exist.