From 4eb7e298b63eb2012b6e2959e5535103bf40e903 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Thu, 1 Mar 2007 00:02:04 +0000 Subject: [PATCH] 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 --- tests/regressiontests/bug639/tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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