mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Used NotSupportedError instead of DatabaseError in SQLCompiler.as_sql().
This commit is contained in:
committed by
Tim Graham
parent
d825ac6dfa
commit
054a44d6f0
@@ -1,5 +1,5 @@
|
||||
from django.db.models import F, IntegerField, Value
|
||||
from django.db.utils import DatabaseError
|
||||
from django.db.utils import DatabaseError, NotSupportedError
|
||||
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
|
||||
|
||||
from .models import Number, ReservedName
|
||||
@@ -73,8 +73,8 @@ class QuerySetSetOperationTests(TestCase):
|
||||
def test_unsupported_intersection_raises_db_error(self):
|
||||
qs1 = Number.objects.all()
|
||||
qs2 = Number.objects.all()
|
||||
msg = 'intersection not supported on this database backend'
|
||||
with self.assertRaisesMessage(DatabaseError, msg):
|
||||
msg = 'intersection is not supported on this database backend'
|
||||
with self.assertRaisesMessage(NotSupportedError, msg):
|
||||
list(qs1.intersection(qs2))
|
||||
|
||||
def test_combining_multiple_models(self):
|
||||
|
||||
Reference in New Issue
Block a user