mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Fixed a ResourceWarning that wasn't properly fixed by the previous commit.
Also removed unused import in runtests.py.
This commit is contained in:
parent
b7de5f5d3f
commit
417ec4a68b
2 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue