mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #22465 -- New assertion assertJSONNotEqual
This commit is contained in:
parent
9bc377d7d0
commit
8394e570ba
4 changed files with 77 additions and 0 deletions
|
@ -155,6 +155,9 @@ Tests
|
|||
:meth:`~django.test.SimpleTestCase.assertTemplateUsed`. This allows you to
|
||||
assert that a template was rendered a specific number of times.
|
||||
|
||||
* :meth:`~django.test.SimpleTestCase.assertJSONNotEqual` new assertion allow
|
||||
you to test that two JSON fragments are not equal.
|
||||
|
||||
Validators
|
||||
^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -1458,6 +1458,13 @@ your test suite.
|
|||
|
||||
Output in case of error can be customized with the ``msg`` argument.
|
||||
|
||||
.. method:: SimpleTestCase.assertJSONNotEqual(raw, expected_data, msg=None)
|
||||
|
||||
Asserts that the JSON fragments ``raw`` and ``expected_data`` are *not* equal.
|
||||
See :meth:`~SimpleTestCase.assertJSONEqual` for further details.
|
||||
|
||||
Output in case of error can be customized with the ``msg`` argument.
|
||||
|
||||
.. method:: TransactionTestCase.assertQuerysetEqual(qs, values, transform=repr, ordered=True, msg=None)
|
||||
|
||||
Asserts that a queryset ``qs`` returns a particular list of values ``values``.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue