diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-27 21:12:48 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-27 21:12:48 +0100 |
| commit | 7aaa8a7779f454c670448c580c8fa36cb37649d3 (patch) | |
| tree | c7b37b7650edbd632f0c1528c30782bd312fab3e | |
| parent | b2c697b02911e6d02455e27afd33747f793103b6 (diff) | |
Fixed a test that relied on database exceptions not being wrapped.
| -rw-r--r-- | tests/backends/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py index b0413b1ebc..7c68863f0b 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -8,7 +8,7 @@ import threading from django.conf import settings from django.core.management.color import no_style from django.db import (backend, connection, connections, DEFAULT_DB_ALIAS, - IntegrityError, transaction) + DatabaseError, IntegrityError, transaction) from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2 import version as pg_version from django.db.models import Sum, Avg, Variance, StdDev @@ -444,7 +444,7 @@ class BackendTestCase(TestCase): connection.settings_dict['PASSWORD'] = "françois" try: cursor = connection.cursor() - except backend.Database.DatabaseError: + except DatabaseError: # As password is probably wrong, a database exception is expected pass except Exception as e: |
