1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Refs #23947 -- Fixed introspection test that had a side effect.

This commit is contained in:
Diego Guimarães 2014-12-05 12:13:22 -02:00 committed by Tim Graham
parent e32a8a99d9
commit 106dde91e4

View File

@ -28,13 +28,9 @@ class IntrospectionTests(TransactionTestCase):
"django_table_names() returned a non-Django table") "django_table_names() returned a non-Django table")
def test_django_table_names_retval_type(self): def test_django_table_names_retval_type(self):
# Ticket #15216 #15216 - Table name is a list
with connection.cursor() as cursor:
cursor.execute('CREATE TABLE django_ixn_test_table (id INTEGER);')
tl = connection.introspection.django_table_names(only_existing=True) tl = connection.introspection.django_table_names(only_existing=True)
self.assertIs(type(tl), list) self.assertIs(type(tl), list)
tl = connection.introspection.django_table_names(only_existing=False) tl = connection.introspection.django_table_names(only_existing=False)
self.assertIs(type(tl), list) self.assertIs(type(tl), list)