Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix TestCase.assertQuerysetEqual on python 3, this is needed for a la…

…rge number of tests
  • Loading branch information...
1 parent 4c97101 commit 7515f6576b593c5f7a1ff2b2f934d5442b52b884 @alex alex committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/test/
5 django/test/
@@ -796,9 +796,10 @@ def assertTemplateNotUsed(self, response=None, template_name=None, msg_prefix=''
" the response" % template_name)
def assertQuerysetEqual(self, qs, values, transform=repr, ordered=True):
+ items =, qs)
if not ordered:
- return self.assertEqual(set(map(transform, qs)), set(values))
- return self.assertEqual(map(transform, qs), values)
+ return self.assertEqual(set(items), set(values))
+ return self.assertEqual(list(items), values)
def assertNumQueries(self, num, func=None, *args, **kwargs):
using = kwargs.pop("using", DEFAULT_DB_ALIAS)

0 comments on commit 7515f65

Please sign in to comment.
Something went wrong with that request. Please try again.