--
Ticket URL: <https://code.djangoproject.com/ticket/22465>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I started a pull request for this ticket here:
https://github.com/django/django/pull/2579
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:1>
* cc: loic@… (added)
* stage: Unreviewed => Accepted
Comment:
Accepting on the basis of consistency with
`assertXMLEqual/assertXMLNotEqual`.
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:2>
Comment (by aaugustin):
I'm not convinced by this argument, comparing XML for equality is a hard
problem, while comparing JSON is just asserting that json.loads of both
args is equal.
In practice I would expect most tests to assert that json.loads of
something is equal to some Python structure.
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:3>
Comment (by loic84):
I agree and I was surprised that we even have `assertJSONEqual()`, but
since we have it, I find it confusing to have one but not its reverse.
Personally I've come to rely on the symmetry `assertX`, `assertNotX`.
What do you think?
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:4>
Comment (by aaugustin):
Oops, sorry, I missed we already had it. Yes, let's add the negative
assertion then.
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:5>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"8394e570baf91cff5e5349c0ef06c4f06f06d0b1"]:
{{{
#!CommitTicketReference repository=""
revision="8394e570baf91cff5e5349c0ef06c4f06f06d0b1"
Fixed #22465 -- New assertion assertJSONNotEqual
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"dc7bc42cce39f8141df40d831de9befb13946fef"]:
{{{
#!CommitTicketReference repository=""
revision="dc7bc42cce39f8141df40d831de9befb13946fef"
Added missing versionadded annotation and tweaked release note; refs
#22465.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22465#comment:7>