1. Luke Plant
  2. django

Commits

Pa...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 805a90a

[soc2010/test-refactor] small fix to allow unittest2 to compare ValuesQuerySet using assertItemsEqual

  • Participants
  • Parent commits ce0d6ac
  • Branches soc2010/test-refactor

Comments (0)

Files changed (1)

File django/utils/unittest/case.py

View file
  • Ignore whitespace
             expected.sort()
             actual = actual_seq[:]
             actual.sort()
-        except TypeError:
+        except (TypeError, AttributeError):
             # Unsortable items (example: set(), complex(), ...)
             expected = list(expected_seq)
             actual = list(actual_seq)