summaryrefslogtreecommitdiff
path: root/src/mailman/database/tests/test_migrations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
-rw-r--r--src/mailman/database/tests/test_migrations.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py
index 90f2a9dfe..777e84fac 100644
--- a/src/mailman/database/tests/test_migrations.py
+++ b/src/mailman/database/tests/test_migrations.py
@@ -30,6 +30,7 @@ __all__ = [
import unittest
from pkg_resources import resource_string
+from storm.exceptions import DatabaseError
from zope.component import getUtility
from mailman.config import config
@@ -78,7 +79,7 @@ class TestMigration20120407Schema(unittest.TestCase):
# Verify that the database has not yet been migrated.
for missing in ('archive_policy',
'nntp_prefix_subject_too'):
- self.assertRaises(self._database.Error,
+ self.assertRaises(DatabaseError,
self._database.store.execute,
'select {0} from mailinglist;'.format(missing))
# Avoid PostgreSQL complaint: InternalError: current transaction
@@ -115,7 +116,7 @@ class TestMigration20120407Schema(unittest.TestCase):
'news_moderation',
'news_prefix_subject_too',
'nntp_host'):
- self.assertRaises(self._database.Error,
+ self.assertRaises(DatabaseError,
self._database.store.execute,
'select {0} from mailinglist;'.format(missing))
# Avoid PostgreSQL complaint: InternalError: current transaction