1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[1.7.x] Fixed #23651 -- Isolated non-existent fixture tests

Previous versions of the tests were buggy, as initial_data.json
did exist and the test wasn't failing. It was finally failing on
Python 3.4.2.
Thanks Raphaël Hertzog for the report (and Debian bug #765117
contributors).
Backport of 7a893ee771 from master.
This commit is contained in:
Claude Paroz
2014-10-14 23:15:43 +02:00
parent 555952c3e6
commit da0ebe39f6
2 changed files with 30 additions and 25 deletions

View File

@@ -16,7 +16,6 @@ from django.db.models import signals
from django.test import (TestCase, TransactionTestCase, skipIfDBFeature,
skipUnlessDBFeature)
from django.test import override_settings
from django.utils.encoding import force_text
from django.utils._os import upath
from django.utils import six
from django.utils.six import PY3, StringIO
@@ -459,18 +458,6 @@ class TestFixtures(TestCase):
verbosity=0,
)
def test_loaddata_not_existant_fixture_file(self):
stdout_output = StringIO()
with warnings.catch_warnings(record=True):
management.call_command(
'loaddata',
'this_fixture_doesnt_exist',
verbosity=2,
stdout=stdout_output,
)
self.assertTrue("No fixture 'this_fixture_doesnt_exist' in" in
force_text(stdout_output.getvalue()))
def test_ticket_20820(self):
"""
Regression for ticket #20820 -- loaddata on a model that inherits