When I run "manage.py test" my tests are run without making permanent changes to the database. But when those tests create new model instances with FileFields they create files in the media folder and those are not cleared out automatically. It seems pretty easy to write a custom Storage sub-class that stores files in memory instead of actually writing them to disk, but I cannot figure out how to use this only during testing (and preferably a fresh instance for each test). What is the normal way to write unit-tests for Django? How do you decouple Django's systems to avoid testing everything at once, and how do you isolate the tests from each other to avoid one failing test from 'contaminating' many others?
Regards, Weeble. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.