diff options
| author | Barry Warsaw | 2012-07-25 12:32:04 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-25 12:32:04 -0400 |
| commit | 762a4cc0838618e549e0562df96cad361f8cde5a (patch) | |
| tree | 2f1a414402bdf655f92c704e4ecc4286e8561034 /src/mailman/database/tests/test_migrations.py | |
| parent | 9ef8a1268f1b2902ad46852937dd7bc977c5b2b1 (diff) | |
| download | mailman-762a4cc0838618e549e0562df96cad361f8cde5a.tar.gz mailman-762a4cc0838618e549e0562df96cad361f8cde5a.tar.zst mailman-762a4cc0838618e549e0562df96cad361f8cde5a.zip | |
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 5 |
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 |
