Skip to content

Commit

Permalink
Added a tearDown to the tests for #639 so that the "uploaded" image d…
Browse files Browse the repository at this point in the history
…oesn't clog /tmp. Sorry, Joseph!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jacobian committed Mar 1, 2007
1 parent 77be302 commit 4eb7e29
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/regressiontests/bug639/tests.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@ def testBug639(self):
p = manip.save(qd) p = manip.save(qd)


# Check the savecount stored on the object (see the model) # Check the savecount stored on the object (see the model)
self.assertEqual(p._savecount, 1) 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())

0 comments on commit 4eb7e29

Please sign in to comment.