diff options
author | Matthew Schinckel <matt@schinckel.net> | 2016-03-02 14:40:46 +1030 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-03-02 13:54:27 -0500 |
commit | 60633ef3dec8421706c610d8238af2cd679fc915 (patch) | |
tree | 33933ade6fbdb3e6921d4c79d0bfeef79cdf0448 /tests/introspection/tests.py | |
parent | 5155c2b4587629c4bc77a11846e5b9d3ba5a43ef (diff) | |
download | django-60633ef3dec8421706c610d8238af2cd679fc915.tar.gz |
Fixed #26304 -- Ignored unmanaged through model in table introspection.
Diffstat (limited to 'tests/introspection/tests.py')
-rw-r--r-- | tests/introspection/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index 9ce5a3f0f6..949914ddbf 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -6,7 +6,7 @@ from django.db import connection from django.db.utils import DatabaseError from django.test import TransactionTestCase, mock, skipUnlessDBFeature -from .models import Article, City, Reporter +from .models import Article, ArticleReporter, City, Reporter class IntrospectionTests(TransactionTestCase): @@ -53,6 +53,10 @@ class IntrospectionTests(TransactionTestCase): self.assertNotIn('introspection_article_view', connection.introspection.table_names()) + def test_unmanaged_through_model(self): + tables = connection.introspection.django_table_names() + self.assertNotIn(ArticleReporter._meta.db_table, tables) + def test_installed_models(self): tables = [Article._meta.db_table, Reporter._meta.db_table] models = connection.introspection.installed_models(tables) |