I\'m trying to build tests for some models that have a FileField. The model looks like this:
class SolutionFile(models.Model): \'\'\' A file from a s
You can override the MEDIA_ROOT setting for your tests using the @override_settings() decorator as documented:
MEDIA_ROOT
@override_settings()
from django.test import override_settings @override_settings(MEDIA_ROOT='/tmp/django_test') def test_post_solution_file(self): # your code here