summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGregor Gärtner <code@gregorgaertner.de>2022-09-24 11:29:58 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-10-08 08:07:38 +0200
commitf0c06f8ab7904e1fd082f2de57337f6c7e05f177 (patch)
tree2073bfe1bb55350d9516f9a54ad7d9895a84ca48 /docs
parentd795259ea96004df0a2469246229a146307bcd2c (diff)
Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to assertQuerySetEqual().
Co-Authored-By: Michael Howitz <mh@gocept.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt2
-rw-r--r--docs/intro/tutorial05.txt12
-rw-r--r--docs/releases/1.6.txt2
-rw-r--r--docs/releases/3.2.txt3
-rw-r--r--docs/releases/4.2.txt3
-rw-r--r--docs/topics/testing/tools.txt9
6 files changed, 21 insertions, 10 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index cbde99fb06..abd5a363bc 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -37,6 +37,8 @@ details on these changes.
* The ``SimpleTestCase.assertFormsetError()`` method will be removed.
+* The ``TransactionTestCase.assertQuerysetEqual()`` method will be removed.
+
.. _deprecation-removed-in-5.0:
5.0
diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt
index 4a453a83b6..4431af71ad 100644
--- a/docs/intro/tutorial05.txt
+++ b/docs/intro/tutorial05.txt
@@ -491,7 +491,7 @@ class:
response = self.client.get(reverse('polls:index'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "No polls are available.")
- self.assertQuerysetEqual(response.context['latest_question_list'], [])
+ self.assertQuerySetEqual(response.context['latest_question_list'], [])
def test_past_question(self):
"""
@@ -500,7 +500,7 @@ class:
"""
question = create_question(question_text="Past question.", days=-30)
response = self.client.get(reverse('polls:index'))
- self.assertQuerysetEqual(
+ self.assertQuerySetEqual(
response.context['latest_question_list'],
[question],
)
@@ -513,7 +513,7 @@ class:
create_question(question_text="Future question.", days=30)
response = self.client.get(reverse('polls:index'))
self.assertContains(response, "No polls are available.")
- self.assertQuerysetEqual(response.context['latest_question_list'], [])
+ self.assertQuerySetEqual(response.context['latest_question_list'], [])
def test_future_question_and_past_question(self):
"""
@@ -523,7 +523,7 @@ class:
question = create_question(question_text="Past question.", days=-30)
create_question(question_text="Future question.", days=30)
response = self.client.get(reverse('polls:index'))
- self.assertQuerysetEqual(
+ self.assertQuerySetEqual(
response.context['latest_question_list'],
[question],
)
@@ -535,7 +535,7 @@ class:
question1 = create_question(question_text="Past question 1.", days=-30)
question2 = create_question(question_text="Past question 2.", days=-5)
response = self.client.get(reverse('polls:index'))
- self.assertQuerysetEqual(
+ self.assertQuerySetEqual(
response.context['latest_question_list'],
[question2, question1],
)
@@ -551,7 +551,7 @@ repetition out of the process of creating questions.
Note that the :class:`django.test.TestCase` class provides some additional
assertion methods. In these examples, we use
:meth:`~django.test.SimpleTestCase.assertContains()` and
-:meth:`~django.test.TransactionTestCase.assertQuerysetEqual()`.
+:meth:`~django.test.TransactionTestCase.assertQuerySetEqual()`.
In ``test_past_question``, we create a question and verify that it appears in
the list.
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
index 2d77c7dc85..ac3b46ab3a 100644
--- a/docs/releases/1.6.txt
+++ b/docs/releases/1.6.txt
@@ -162,7 +162,7 @@ Minor features
* The ``HttpOnly`` flag can be set on the CSRF cookie with
:setting:`CSRF_COOKIE_HTTPONLY`.
-* The :meth:`~django.test.TransactionTestCase.assertQuerysetEqual` now checks
+* The ``assertQuerysetEqual()`` now checks
for undefined order and raises :exc:`ValueError` if undefined
order is spotted. The order is seen as undefined if the given ``QuerySet``
isn't ordered and there is more than one ordered value to compare against.
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt
index 15a079988d..0195e3cf6e 100644
--- a/docs/releases/3.2.txt
+++ b/docs/releases/3.2.txt
@@ -539,7 +539,8 @@ Tests
<django.db.transaction.on_commit>` in a list. This allows you to test such
callbacks without using the slower :class:`.TransactionTestCase`.
-* :meth:`.TransactionTestCase.assertQuerysetEqual` now supports direct
+* :meth:`TransactionTestCase.assertQuerysetEqual()
+ <django.test.TransactionTestCase.assertQuerySetEqual>` now supports direct
comparison against another queryset rather than being restricted to
comparison against a list of string representations of objects when using the
default value for the ``transform`` argument.
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index 33035d7881..c3ddb7c7af 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -422,3 +422,6 @@ Miscellaneous
* ``SimpleTestCase.assertFormsetError()`` is deprecated in favor of
``assertFormSetError()``.
+
+* ``TransactionTestCase.assertQuerysetEqual()`` is deprecated in favor of
+ ``assertQuerySetEqual()``.
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 4e2003acde..0eb6fee113 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -787,7 +787,7 @@ add some database-specific features:
* Database :attr:`~TransactionTestCase.fixtures`.
* Test :ref:`skipping based on database backend features <skipping-tests>`.
* The remaining specialized :meth:`assert*
- <TransactionTestCase.assertQuerysetEqual>` methods.
+ <TransactionTestCase.assertQuerySetEqual>` methods.
Django's :class:`TestCase` class is a more commonly used subclass of
``TransactionTestCase`` that makes use of database transaction facilities
@@ -1777,7 +1777,7 @@ your test suite.
Output in case of error can be customized with the ``msg`` argument.
-.. method:: TransactionTestCase.assertQuerysetEqual(qs, values, transform=None, ordered=True, msg=None)
+.. method:: TransactionTestCase.assertQuerySetEqual(qs, values, transform=None, ordered=True, msg=None)
Asserts that a queryset ``qs`` matches a particular iterable of values
``values``.
@@ -1794,6 +1794,11 @@ your test suite.
Output in case of error can be customized with the ``msg`` argument.
+ .. deprecated:: 4.2
+
+ The ``assertQuerysetEqual()`` assertion method is deprecated. Use
+ ``assertQuerySetEqual()`` instead.
+
.. method:: TransactionTestCase.assertNumQueries(num, func, *args, **kwargs)
Asserts that when ``func`` is called with ``*args`` and ``**kwargs`` that