Fixed #27135 -- Made index introspection return Index.suffix.

This commit is contained in:
Tim Graham 2017-02-15 13:33:55 -05:00
parent a7214f0e84
commit b008f7cc56
7 changed files with 22 additions and 9 deletions

View file

@ -1,6 +1,7 @@
from unittest import mock, skipUnless
from django.db import connection
from django.db.models import Index
from django.db.utils import DatabaseError
from django.test import TransactionTestCase, skipUnlessDBFeature
from django.test.utils import ignore_warnings
@ -191,7 +192,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):