Kaydet (Commit) 7aaa8a77 authored tarafından Aymeric Augustin's avatar Aymeric Augustin

Fixed a test that relied on database exceptions not being wrapped.

üst b2c697b0
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment