diff options
| author | Thomas Chaumeny <t.chaumeny@gmail.com> | 2014-10-18 20:03:10 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-03 14:14:39 -0500 |
| commit | d89f56dc4d03f6bf6602536b8b62602ec0d46d2f (patch) | |
| tree | ee089210ebb576d286abbe2bee51db042ee6ee48 /tests/file_uploads | |
| parent | 8b77b64f1cf878b100d1d2001c8a73938ea3e1ed (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.py | 4 |
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() |
