summaryrefslogtreecommitdiff
path: root/tests/file_uploads
diff options
context:
space:
mode:
authorThomas Chaumeny <t.chaumeny@gmail.com>2014-10-18 20:03:10 +0200
committerTim Graham <timograham@gmail.com>2014-11-03 14:14:39 -0500
commitd89f56dc4d03f6bf6602536b8b62602ec0d46d2f (patch)
treeee089210ebb576d286abbe2bee51db042ee6ee48 /tests/file_uploads
parent8b77b64f1cf878b100d1d2001c8a73938ea3e1ed (diff)
Fixed #21281 -- Made override_settings act at class level when used as a TestCase decorator.
Diffstat (limited to 'tests/file_uploads')
-rw-r--r--tests/file_uploads/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index fe1a79fc9f..4fa75415ec 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -33,12 +33,14 @@ class FileUploadTests(TestCase):
@classmethod
def setUpClass(cls):
+ super(FileUploadTests, cls).setUpClass()
if not os.path.isdir(MEDIA_ROOT):
os.makedirs(MEDIA_ROOT)
@classmethod
def tearDownClass(cls):
shutil.rmtree(MEDIA_ROOT)
+ super(FileUploadTests, cls).tearDownClass()
def test_simple_upload(self):
with open(__file__, 'rb') as fp:
@@ -494,12 +496,14 @@ class DirectoryCreationTests(TestCase):
"""
@classmethod
def setUpClass(cls):
+ super(DirectoryCreationTests, cls).setUpClass()
if not os.path.isdir(MEDIA_ROOT):
os.makedirs(MEDIA_ROOT)
@classmethod
def tearDownClass(cls):
shutil.rmtree(MEDIA_ROOT)
+ super(DirectoryCreationTests, cls).tearDownClass()
def setUp(self):
self.obj = FileModel()