diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-10-18 18:29:52 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-06 09:24:50 +0100 |
| commit | 3f7b3275627385f8f7531fca01cdda50d4ec6b6e (patch) | |
| tree | fb082d40e73f6c877911eab92229ac21cdfaa5bc /docs/releases/3.2.txt | |
| parent | 13b6fff11703a694e155b84d41d02822bbc0aaa0 (diff) | |
Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.
This also replaces assertQuerysetEqual() to
assertSequenceEqual()/assertCountEqual() where appropriate.
Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs/releases/3.2.txt')
| -rw-r--r-- | docs/releases/3.2.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index a460f96eef..f542a4fee9 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -422,6 +422,11 @@ 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 + 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. + URLs ~~~~ @@ -615,3 +620,8 @@ Miscellaneous * The ``default_app_config`` application configuration variable is deprecated, due to the now automatic ``AppConfig`` discovery. See :ref:`whats-new-3.2` for more details. + +* Automatically calling ``repr()`` on a queryset in + ``TransactionTestCase.assertQuerysetEqual()``, when compared to string + values, is deprecated. If you need the previous behavior, explicitly set + ``transform`` to ``repr``. |
