summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-02-11 22:12:49 +0000
committerRamiro Morales <cramm0@gmail.com>2012-02-11 22:12:49 +0000
commit98b4572ef7fee55d4ec92705cf45770a1318c10b (patch)
tree7a4d590ee0fd96917cf1eb947db1a1f8fe3aedc2 /tests
parenta411242e947c2c330a87ec5149510114312c8b8d (diff)
Fixed #15216 -- Made return type of an internal DB introspection method consistent.
Thanks arthur AT milliways DOT fr for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/introspection/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py
index fa2b6c5d73..c3d3533f94 100644
--- a/tests/regressiontests/introspection/tests.py
+++ b/tests/regressiontests/introspection/tests.py
@@ -53,6 +53,17 @@ class IntrospectionTests(TestCase):
self.assertTrue('django_ixn_testcase_table' not in tl,
"django_table_names() returned a non-Django table")
+ def test_django_table_names_retval_type(self):
+ # Ticket #15216
+ cursor = connection.cursor()
+ cursor.execute('CREATE TABLE django_ixn_test_table (id INTEGER);')
+
+ tl = connection.introspection.django_table_names(only_existing=True)
+ self.assertIs(type(tl), list)
+
+ tl = connection.introspection.django_table_names(only_existing=False)
+ self.assertIs(type(tl), list)
+
def test_installed_models(self):
tables = [Article._meta.db_table, Reporter._meta.db_table]
models = connection.introspection.installed_models(tables)