Commit 6bf01a9 1 parent 4d02f55 commit 6bf01a9 Copy full SHA for 6bf01a9
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
import pickle
2
- import tempfile
3
2
from unittest import mock
4
3
from unittest .case import skipUnless
5
4
6
5
import django
7
6
import pytest
8
7
from django .core import checks , validators
8
+ from django .core .files .temp import NamedTemporaryFile
9
9
from django .core .management import call_command
10
10
from django .db import models
11
11
from django .forms import Select
@@ -679,7 +679,7 @@ class TestLoadData(TestCase):
679
679
def test_basic (self ):
680
680
single = Person .objects .create (name = "Chris Beaven" , country = "NZ" )
681
681
multi = MultiCountry .objects .create (countries = ["NZ" , "AU" ])
682
- with tempfile . NamedTemporaryFile (suffix = ".json" , mode = "w+" ) as capture :
682
+ with NamedTemporaryFile (suffix = ".json" , mode = "w+" ) as capture :
683
683
call_command ("dumpdata" , "django_countries_tests" , stdout = capture )
684
684
single .delete ()
685
685
multi .delete ()
You can’t perform that action at this time.
0 commit comments