summaryrefslogtreecommitdiff
path: root/tests/introspection
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-09-02 20:28:48 -0400
committerTim Graham <timograham@gmail.com>2017-09-22 12:51:18 -0400
commit578711c31052625cc87319cf1c46662c14d75ce9 (patch)
tree2ed77452adfebe4d8f54066b56bcc8cd11696c85 /tests/introspection
parente62165b898785e890661953c3b2c9c36d98aee57 (diff)
downloaddjango-578711c31052625cc87319cf1c46662c14d75ce9.tar.gz
Refs #27098 -- Removed DatabaseIntrospection.get_indexes() per deprecation timeline.
Diffstat (limited to 'tests/introspection')
-rw-r--r--tests/introspection/tests.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py
index ed10927b2a..2e68e52542 100644
--- a/tests/introspection/tests.py
+++ b/tests/introspection/tests.py
@@ -4,8 +4,6 @@ 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
-from django.utils.deprecation import RemovedInDjango21Warning
from .models import Article, ArticleReporter, City, District, Reporter
@@ -170,22 +168,6 @@ class IntrospectionTests(TransactionTestCase):
self.assertEqual(primary_key_column, 'id')
self.assertEqual(pk_fk_column, 'city_id')
- @ignore_warnings(category=RemovedInDjango21Warning)
- def test_get_indexes(self):
- with connection.cursor() as cursor:
- indexes = connection.introspection.get_indexes(cursor, Article._meta.db_table)
- self.assertEqual(indexes['reporter_id'], {'unique': False, 'primary_key': False})
-
- @ignore_warnings(category=RemovedInDjango21Warning)
- def test_get_indexes_multicol(self):
- """
- Multicolumn indexes are not included in the introspection results.
- """
- with connection.cursor() as cursor:
- indexes = connection.introspection.get_indexes(cursor, Reporter._meta.db_table)
- self.assertNotIn('first_name', indexes)
- self.assertIn('id', indexes)
-
def test_get_constraints_index_types(self):
with connection.cursor() as cursor:
constraints = connection.introspection.get_constraints(cursor, Article._meta.db_table)