mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Added cleanup for an introspection test.
This commit is contained in:
parent
e8c4596329
commit
c7e9e22695
@ -44,9 +44,12 @@ class IntrospectionTests(TransactionTestCase):
|
|||||||
self.fail("The test user has no CREATE VIEW privileges")
|
self.fail("The test user has no CREATE VIEW privileges")
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
try:
|
||||||
self.assertIn('introspection_article_view', connection.introspection.table_names(include_views=True))
|
self.assertIn('introspection_article_view', connection.introspection.table_names(include_views=True))
|
||||||
self.assertNotIn('introspection_article_view', connection.introspection.table_names())
|
self.assertNotIn('introspection_article_view', connection.introspection.table_names())
|
||||||
|
finally:
|
||||||
|
with connection.cursor() as cursor:
|
||||||
|
cursor.execute('DROP VIEW introspection_article_view')
|
||||||
|
|
||||||
def test_unmanaged_through_model(self):
|
def test_unmanaged_through_model(self):
|
||||||
tables = connection.introspection.django_table_names()
|
tables = connection.introspection.django_table_names()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user