Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix warnings imports in fixtures tests

  • Loading branch information...
commit 65c557115f6e76293c39ce7b73b62216911f9489 1 parent c44a2c4
Senko Rašić senko authored
3  tests/fixtures_model_package/tests.py
View
@@ -1,5 +1,7 @@
from __future__ import unicode_literals
+import warnings
+
from django.core import management
from django.db import transaction
from django.test import TestCase, TransactionTestCase
@@ -100,7 +102,6 @@ def test_loaddata(self):
)
# Load a fixture that doesn't exist
- import warnings
with warnings.catch_warnings(record=True):
management.call_command("loaddata", "unknown.json", verbosity=0, commit=False)
2  tests/fixtures_regress/tests.py
View
@@ -4,6 +4,7 @@
import os
import re
+import warnings
from django.core.serializers.base import DeserializationError
from django.core import management
@@ -441,7 +442,6 @@ def test_loaddata_no_fixture_specified(self):
def test_loaddata_not_existant_fixture_file(self):
stdout_output = StringIO()
- import warnings
with warnings.catch_warnings(record=True):
management.call_command(
'loaddata',
Please sign in to comment.
Something went wrong with that request. Please try again.