﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33609	Use assertCountEqual() in assertQuerysetEqual().	David	nobody	"As of now the assertQueryEqual method 
[[https://github.com/django/django/blob/04ad0f26ba4b8c79dc311e1789457e0c4d1b8832/django/test/testcases.py#L1240-L1241|ueses counters to compare unordered Querysets]], in the standard unittest package there is already such method called 
[[https://docs.python.org/3/library/unittest.html?highlight=assertcountequal#unittest.TestCase.assertCountEqual|assertCountEqual]], which also has better output-formatting capability.

{{{#!python
self.assertCountEqual(items, values, msg=msg)
}}}

Using data from current test it will output:

{{{
Element counts were not equal:
First has 0, Second has 1:  'Extra Person'
}}}
"	Cleanup/optimization	closed	Testing framework	dev	Normal	wontfix	queryseteuql	Nick Pope	Unreviewed	0	0	0	0	1	0
