mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #20392 -- Added TestCase.setUpTestData()
Each TestCase is also now wrapped in a class-wide transaction.
This commit is contained in:
parent
dee4d23f7e
commit
da9fe5c717
7 changed files with 136 additions and 35 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue