mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #20392 -- Added TestCase.setUpTestData()
Each TestCase is also now wrapped in a class-wide transaction.
This commit is contained in:
committed by
Tim Graham
parent
dee4d23f7e
commit
da9fe5c717
@@ -2,12 +2,15 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.db import connection
|
||||
from django.db.utils import DatabaseError
|
||||
from django.test import TestCase, skipUnlessDBFeature
|
||||
from django.test import TransactionTestCase, skipUnlessDBFeature
|
||||
|
||||
from .models import Reporter, Article
|
||||
|
||||
|
||||
class IntrospectionTests(TestCase):
|
||||
class IntrospectionTests(TransactionTestCase):
|
||||
|
||||
available_apps = ['introspection']
|
||||
|
||||
def test_table_names(self):
|
||||
tl = connection.introspection.table_names()
|
||||
self.assertEqual(tl, sorted(tl))
|
||||
|
||||
Reference in New Issue
Block a user