Skip to content

Commit 6bf01a9

Browse files
committed
Fix a failing test on Windows
1 parent 4d02f55 commit 6bf01a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_countries/tests/test_fields.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import pickle
2-
import tempfile
32
from unittest import mock
43
from unittest.case import skipUnless
54

65
import django
76
import pytest
87
from django.core import checks, validators
8+
from django.core.files.temp import NamedTemporaryFile
99
from django.core.management import call_command
1010
from django.db import models
1111
from django.forms import Select
@@ -679,7 +679,7 @@ class TestLoadData(TestCase):
679679
def test_basic(self):
680680
single = Person.objects.create(name="Chris Beaven", country="NZ")
681681
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:
683683
call_command("dumpdata", "django_countries_tests", stdout=capture)
684684
single.delete()
685685
multi.delete()

0 commit comments

Comments
 (0)