summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-03-01 00:02:04 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-03-01 00:02:04 +0000
commit4eb7e298b63eb2012b6e2959e5535103bf40e903 (patch)
treeb6ba604f6a741efecb75da95385a676787687dd8
parent77be30246982b21e21a8674f64c4d5d05638a5f4 (diff)
Added a tearDown to the tests for #639 so that the "uploaded" image doesn't clog /tmp. Sorry, Joseph!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/bug639/tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/regressiontests/bug639/tests.py b/tests/regressiontests/bug639/tests.py
index c05ef120e1..f9596d06cb 100644
--- a/tests/regressiontests/bug639/tests.py
+++ b/tests/regressiontests/bug639/tests.py
@@ -32,4 +32,11 @@ class Bug639Test(unittest.TestCase):
p = manip.save(qd)
# Check the savecount stored on the object (see the model)
- self.assertEqual(p._savecount, 1) \ No newline at end of file
+ self.assertEqual(p._savecount, 1)
+
+ def tearDown(self):
+ """
+ Make sure to delete the "uploaded" file to avoid clogging /tmp.
+ """
+ p = Photo.objects.get()
+ os.unlink(p.get_image_filename()) \ No newline at end of file