From 26a39322896fa372e4f56c610a3c68b5c16c600b Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 3 Mar 2014 17:55:11 +0100 Subject: [PATCH] Fix tmpdir teardown --- tests/storage/dav/__init__.py | 2 +- tests/storage/test_filesystem.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storage/dav/__init__.py b/tests/storage/dav/__init__.py index 28bca69..84d4157 100644 --- a/tests/storage/dav/__init__.py +++ b/tests/storage/dav/__init__.py @@ -92,7 +92,7 @@ class DavStorageTests(StorageTests): return r return self.storage_class(url=full_url, _request_func=x, **kwargs) - def tearDown(self): + def teardown_method(self, method): self.app = None if self.tmpdir is not None: shutil.rmtree(self.tmpdir) diff --git a/tests/storage/test_filesystem.py b/tests/storage/test_filesystem.py index 7658a27..56e70a4 100644 --- a/tests/storage/test_filesystem.py +++ b/tests/storage/test_filesystem.py @@ -22,7 +22,7 @@ class FilesystemStorageTests(TestCase, StorageTests): path = self.tmpdir = tempfile.mkdtemp() return FilesystemStorage(path=path, fileext='.txt', **kwargs) - def tearDown(self): + def teardown_method(self, method): if self.tmpdir is not None: shutil.rmtree(self.tmpdir) self.tmpdir = None