From 2f19306a125a9253d99b35b276d932e8e24d4e6f Mon Sep 17 00:00:00 2001 From: Akshesh Date: Mon, 8 Aug 2016 10:29:08 +0530 Subject: Refs #27030 -- Added index type introspection on PostgreSQL. --- tests/introspection/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index 31b0214704..f01f81e718 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -170,6 +170,11 @@ class IntrospectionTests(TransactionTestCase): def test_get_indexes(self): with connection.cursor() as cursor: indexes = connection.introspection.get_indexes(cursor, Article._meta.db_table) + if connection.features.can_introspect_index_type: + index_type = indexes['reporter_id'].pop('type', None) + self.assertIsNotNone(index_type) + if connection.vendor == 'postgresql': + self.assertEqual(index_type, 'btree') self.assertEqual(indexes['reporter_id'], {'unique': False, 'primary_key': False}) def test_get_indexes_multicol(self): -- cgit v1.3