From 8394e570baf91cff5e5349c0ef06c4f06f06d0b1 Mon Sep 17 00:00:00 2001 From: amatellanes Date: Thu, 17 Apr 2014 11:44:30 +0200 Subject: Fixed #22465 -- New assertion assertJSONNotEqual --- docs/releases/1.8.txt | 3 +++ docs/topics/testing/tools.txt | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 35a2534792..9c8bb0c03e 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -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 ^^^^^^^^^^ diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 29a94b713c..188da1bbaf 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -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``. -- cgit v1.3