Fixed ModelState breaking when unique_together has unhashable elements.

This commit is contained in:
Baptiste Mispelon 2013-12-06 15:05:12 +01:00
parent 54d9e3ccf6
commit 19e4374971
3 changed files with 10 additions and 6 deletions

View file

@ -55,7 +55,7 @@ class StateTests(TestCase):
self.assertEqual(author_state.fields[1][1].max_length, 255)
self.assertEqual(author_state.fields[2][1].null, False)
self.assertEqual(author_state.fields[3][1].null, True)
self.assertEqual(author_state.options, {"unique_together": set(("name", "bio"))})
self.assertEqual(author_state.options, {"unique_together": {("name", "bio")}})
self.assertEqual(author_state.bases, (models.Model, ))
self.assertEqual(book_state.app_label, "migrations")