1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #20392 -- Added TestCase.setUpTestData()

Each TestCase is also now wrapped in a class-wide transaction.
This commit is contained in:
Thomas Chaumeny
2014-10-18 23:01:13 +02:00
committed by Tim Graham
parent dee4d23f7e
commit da9fe5c717
7 changed files with 136 additions and 35 deletions

View File

@@ -1,10 +1,10 @@
from django.test import TestCase
from django.test import TransactionTestCase
from django.core import management
from .models import Book
class TestNoInitialDataLoading(TestCase):
class TestNoInitialDataLoading(TransactionTestCase):
"""
Apps with migrations should ignore initial data. This test can be removed
in Django 1.9 when migrations become required and initial data is no longer