summaryrefslogtreecommitdiff
path: root/tests/migrations
diff options
context:
space:
mode:
authorAnubhav Joshi <anubhav9042@gmail.com>2014-03-02 00:36:15 +0530
committerTim Graham <timograham@gmail.com>2014-03-01 15:44:42 -0500
commitbb2ca9fe6cdd490526b44b30f207c8f743bfaa84 (patch)
tree8e448c5f136ad0160d062bc65e23bc107cee656c /tests/migrations
parent3273bd7b254680a5b241e2fdbc3196956b2b44e8 (diff)
Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
Thanks EmilStenstrom for the suggestion.
Diffstat (limited to 'tests/migrations')
-rw-r--r--tests/migrations/test_state.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py
index 5c71376179..187b06b94a 100644
--- a/tests/migrations/test_state.py
+++ b/tests/migrations/test_state.py
@@ -25,6 +25,7 @@ class StateTests(TestCase):
app_label = "migrations"
apps = new_apps
unique_together = ["name", "bio"]
+ index_together = ["bio", "age"]
class AuthorProxy(Author):
class Meta:
@@ -63,7 +64,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": set([("name", "bio")]), "index_together": set([("bio", "age")])})
self.assertEqual(author_state.bases, (models.Model, ))
self.assertEqual(book_state.app_label, "migrations")