summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2014-05-26 04:01:41 +0700
committerLoic Bistuer <loic.bistuer@gmail.com>2014-05-26 04:01:41 +0700
commit417ec4a68b0460bd563801549ca90de64e55face (patch)
treefbd3d93b15c6b0e7b7a718e29b07aa00ae05e453 /tests
parentb7de5f5d3f0d895c29ed27ad872d360bf95c8a2f (diff)
Fixed a ResourceWarning that wasn't properly fixed by the previous commit.
Also removed unused import in runtests.py.
Diffstat (limited to 'tests')
-rw-r--r--tests/file_uploads/tests.py2
-rwxr-xr-xtests/runtests.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index 0e8cf7ff9f..b6f8cfe17e 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -271,12 +271,10 @@ class FileUploadTests(TestCase):
file = tempfile.NamedTemporaryFile
with file() as smallfile, file() as bigfile:
# A small file (under the 5M quota)
- smallfile = tempfile.NamedTemporaryFile()
smallfile.write(b'a' * (2 ** 21))
smallfile.seek(0)
# A big file (over the quota)
- bigfile = tempfile.NamedTemporaryFile()
bigfile.write(b'a' * (10 * 2 ** 20))
bigfile.seek(0)
diff --git a/tests/runtests.py b/tests/runtests.py
index fd459125f9..04c0d6a02f 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -10,7 +10,7 @@ import warnings
import django
from django import contrib
-from django.apps import apps, AppConfig
+from django.apps import apps
from django.conf import settings
from django.db import connection
from django.test import TransactionTestCase, TestCase