Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix warnings imports in fixtures tests

  • Loading branch information...
commit 65c557115f6e76293c39ce7b73b62216911f9489 1 parent c44a2c4
Senko Rašić authored May 19, 2013
3  tests/fixtures_model_package/tests.py
... ...
@@ -1,5 +1,7 @@
1 1
 from __future__ import unicode_literals
2 2
 
  3
+import warnings
  4
+
3 5
 from django.core import management
4 6
 from django.db import transaction
5 7
 from django.test import TestCase, TransactionTestCase
@@ -100,7 +102,6 @@ def test_loaddata(self):
100 102
         )
101 103
 
102 104
         # Load a fixture that doesn't exist
103  
-        import warnings
104 105
         with warnings.catch_warnings(record=True):
105 106
             management.call_command("loaddata", "unknown.json", verbosity=0, commit=False)
106 107
 
2  tests/fixtures_regress/tests.py
@@ -4,6 +4,7 @@
4 4
 
5 5
 import os
6 6
 import re
  7
+import warnings
7 8
 
8 9
 from django.core.serializers.base import DeserializationError
9 10
 from django.core import management
@@ -441,7 +442,6 @@ def test_loaddata_no_fixture_specified(self):
441 442
 
442 443
     def test_loaddata_not_existant_fixture_file(self):
443 444
         stdout_output = StringIO()
444  
-        import warnings
445 445
         with warnings.catch_warnings(record=True):
446 446
             management.call_command(
447 447
                 'loaddata',

0 notes on commit 65c5571

Please sign in to comment.
Something went wrong with that request. Please try again.