1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

[1.11.x] Fixed #27135 -- Made index introspection return Index.suffix.

Backport of b008f7cc56 from master
This commit is contained in:
Tim Graham
2017-02-15 13:33:55 -05:00
parent 197a2cd487
commit 2f6cdc09c4
7 changed files with 22 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from unittest import skipUnless
from django.db import connection
from django.db.models import Index
from django.db.utils import DatabaseError
from django.test import TransactionTestCase, mock, skipUnlessDBFeature
from django.test.utils import ignore_warnings
@@ -193,7 +194,7 @@ class IntrospectionTests(TransactionTestCase):
for key, val in constraints.items():
if val['columns'] == ['headline', 'pub_date']:
index = val
self.assertEqual(index['type'], 'btree')
self.assertEqual(index['type'], Index.suffix)
@skipUnlessDBFeature('supports_index_column_ordering')
def test_get_constraints_indexes_orders(self):