summaryrefslogtreecommitdiff
path: root/test/dialect/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-05-09 16:34:10 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-05-09 16:34:10 +0000
commit4a6afd469fad170868554bf28578849bf3dfd5dd (patch)
treeb396edc33d567ae19dd244e87137296450467725 /test/dialect/postgres.py
parent46b7c9dc57a38d5b9e44a4723dad2ad8ec57baca (diff)
downloadsqlalchemy-4a6afd469fad170868554bf28578849bf3dfd5dd.tar.gz
r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
Diffstat (limited to 'test/dialect/postgres.py')
-rw-r--r--test/dialect/postgres.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dialect/postgres.py b/test/dialect/postgres.py
index 90cc0a477..3e5c200e4 100644
--- a/test/dialect/postgres.py
+++ b/test/dialect/postgres.py
@@ -2,7 +2,7 @@ import testenv; testenv.configure_for_tests()
import datetime
from sqlalchemy import *
from sqlalchemy.orm import *
-from sqlalchemy import exceptions
+from sqlalchemy import exc
from sqlalchemy.databases import postgres
from sqlalchemy.engine.strategies import MockEngineStrategy
from testlib import *
@@ -332,12 +332,12 @@ class InsertTest(TestBase, AssertsExecutionResults):
try:
table.insert().execute({'data':'d2'})
assert False
- except exceptions.IntegrityError, e:
+ except exc.IntegrityError, e:
assert "violates not-null constraint" in str(e)
try:
table.insert().execute({'data':'d2'}, {'data':'d3'})
assert False
- except exceptions.IntegrityError, e:
+ except exc.IntegrityError, e:
assert "violates not-null constraint" in str(e)
table.insert().execute({'id':31, 'data':'d2'}, {'id':32, 'data':'d3'})
@@ -359,12 +359,12 @@ class InsertTest(TestBase, AssertsExecutionResults):
try:
table.insert().execute({'data':'d2'})
assert False
- except exceptions.IntegrityError, e:
+ except exc.IntegrityError, e:
assert "violates not-null constraint" in str(e)
try:
table.insert().execute({'data':'d2'}, {'data':'d3'})
assert False
- except exceptions.IntegrityError, e:
+ except exc.IntegrityError, e:
assert "violates not-null constraint" in str(e)
table.insert().execute({'id':31, 'data':'d2'}, {'id':32, 'data':'d3'})
@@ -387,7 +387,7 @@ class DomainReflectionTest(TestBase, AssertsExecutionResults):
try:
con.execute('CREATE DOMAIN testdomain INTEGER NOT NULL DEFAULT 42')
con.execute('CREATE DOMAIN alt_schema.testdomain INTEGER DEFAULT 0')
- except exceptions.SQLError, e:
+ except exc.SQLError, e:
if not "already exists" in str(e):
raise e
con.execute('CREATE TABLE testtable (question integer, answer testdomain)')