diff options
author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-12-13 13:33:11 +0200 |
---|---|---|
committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-12-13 13:33:11 +0200 |
commit | 088d3bc2f84b6b68fee7e5de053b58049bd110e7 (patch) | |
tree | ecb350eeba16a0b05c131008a552a91f23644e95 /docs | |
parent | 6ed6a18a033ba78de9418f5b56b80f8b3d3aaf11 (diff) | |
download | django-088d3bc2f84b6b68fee7e5de053b58049bd110e7.tar.gz |
Fixed #19462 -- Made assertQuerysetEqual detect undefined ordering
If there are more than one values to compare against and the qs isn't
ordered then assertQuerysetEqual will raise a ValueError.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/releases/1.6.txt | 5 | ||||
-rw-r--r-- | docs/topics/testing.txt | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index 49649bc6b8..1f57913397 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -23,6 +23,11 @@ Minor features * Authentication backends can raise ``PermissionDenied`` to immediately fail the authentication chain. +* The ``assertQuerysetEqual()`` now checks for undefined order and raises + ``ValueError`` if undefined order is spotted. The order is seen as + undefined if the given ``QuerySet`` isn't ordered and there are more than + one ordered values to compare against. + Backwards incompatible changes in 1.6 ===================================== diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index a1524e4f15..a52e4fe169 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -1770,6 +1770,11 @@ your test suite. via an explicit ``order_by()`` call on the queryset prior to comparison. + .. versionchanged:: 1.6 + The method now checks for undefined order and raises ``ValueError`` + if undefined order is spotted. The ordering is seen as undefined if + the given ``qs`` isn't ordered and the comparison is against more + than one ordered values. .. method:: TestCase.assertNumQueries(num, func, *args, **kwargs) |