summaryrefslogtreecommitdiff
path: root/tests/select_for_update
diff options
context:
space:
mode:
authorza <za@python.or.id>2016-10-27 14:53:39 +0700
committerTim Graham <timograham@gmail.com>2016-11-10 21:30:21 -0500
commit321e94fa41b121f65c02119c02098df327bbd569 (patch)
treece5476c191d589aca4b124f841dfbccac8dd299f /tests/select_for_update
parent4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff)
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/select_for_update')
-rw-r--r--tests/select_for_update/tests.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
index 4c30ff7179..9e5ee598b0 100644
--- a/tests/select_for_update/tests.py
+++ b/tests/select_for_update/tests.py
@@ -63,7 +63,7 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update')
def test_for_update_sql_generated(self):
"""
- Test that the backend's FOR UPDATE variant appears in
+ The backend's FOR UPDATE variant appears in
generated SQL when select_for_update is invoked.
"""
with transaction.atomic(), CaptureQueriesContext(connection) as ctx:
@@ -73,7 +73,7 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update_nowait')
def test_for_update_sql_generated_nowait(self):
"""
- Test that the backend's FOR UPDATE NOWAIT variant appears in
+ The backend's FOR UPDATE NOWAIT variant appears in
generated SQL when select_for_update is invoked.
"""
with transaction.atomic(), CaptureQueriesContext(connection) as ctx:
@@ -83,7 +83,7 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update_skip_locked')
def test_for_update_sql_generated_skip_locked(self):
"""
- Test that the backend's FOR UPDATE SKIP LOCKED variant appears in
+ The backend's FOR UPDATE SKIP LOCKED variant appears in
generated SQL when select_for_update is invoked.
"""
with transaction.atomic(), CaptureQueriesContext(connection) as ctx:
@@ -163,7 +163,7 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update')
def test_for_update_requires_transaction(self):
"""
- Test that a TransactionManagementError is raised
+ A TransactionManagementError is raised
when a select_for_update query is executed outside of a transaction.
"""
with self.assertRaises(transaction.TransactionManagementError):
@@ -172,7 +172,7 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update')
def test_for_update_requires_transaction_only_in_execution(self):
"""
- Test that no TransactionManagementError is raised
+ No TransactionManagementError is raised
when select_for_update is invoked outside of a transaction -
only when the query is executed.
"""
@@ -207,9 +207,8 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('supports_transactions')
def test_block(self):
"""
- Check that a thread running a select_for_update that
- accesses rows being touched by a similar operation
- on another connection blocks correctly.
+ A thread running a select_for_update that accesses rows being touched
+ by a similar operation on another connection blocks correctly.
"""
# First, let's start the transaction in our thread.
self.start_blocking_transaction()
@@ -255,8 +254,8 @@ class SelectForUpdateTests(TransactionTestCase):
@skipUnlessDBFeature('has_select_for_update')
def test_raw_lock_not_available(self):
"""
- Check that running a raw query which can't obtain a FOR UPDATE lock
- raises the correct exception
+ Running a raw query which can't obtain a FOR UPDATE lock raises
+ the correct exception
"""
self.start_blocking_transaction()