summaryrefslogtreecommitdiff
path: root/tests/select_for_update
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2017-04-10 18:49:27 +0200
committerTim Graham <timograham@gmail.com>2017-04-10 12:49:27 -0400
commit054a44d6f0f75395bd02a21e31ea904a24750a2b (patch)
treec383a233cc9626ce3e4456c97b385cf328f3099f /tests/select_for_update
parentd825ac6dfab93c34fef27eb62c382eb7a9dabff8 (diff)
Used NotSupportedError instead of DatabaseError in SQLCompiler.as_sql().
Diffstat (limited to 'tests/select_for_update')
-rw-r--r--tests/select_for_update/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
index d2a32840c7..b36ff6114c 100644
--- a/tests/select_for_update/tests.py
+++ b/tests/select_for_update/tests.py
@@ -137,7 +137,7 @@ class SelectForUpdateTests(TransactionTestCase):
DatabaseError is raised if a SELECT...FOR UPDATE NOWAIT is run on
a database backend that supports FOR UPDATE but not NOWAIT.
"""
- with self.assertRaisesMessage(DatabaseError, 'NOWAIT is not supported on this database backend.'):
+ with self.assertRaisesMessage(NotSupportedError, 'NOWAIT is not supported on this database backend.'):
with transaction.atomic():
Person.objects.select_for_update(nowait=True).get()
@@ -148,7 +148,7 @@ class SelectForUpdateTests(TransactionTestCase):
DatabaseError is raised if a SELECT...FOR UPDATE SKIP LOCKED is run on
a database backend that supports FOR UPDATE but not SKIP LOCKED.
"""
- with self.assertRaisesMessage(DatabaseError, 'SKIP LOCKED is not supported on this database backend.'):
+ with self.assertRaisesMessage(NotSupportedError, 'SKIP LOCKED is not supported on this database backend.'):
with transaction.atomic():
Person.objects.select_for_update(skip_locked=True).get()