I have a model with a FileField. I want to unittest it. django test framework has great ways to manage database and emails. Is there something similar for FileFields?
Ho
I guess that easiest way is to use ContentFile class:
file = ContentFile('text', 'name') my_model = MyModel() my_model.file = file my_model.save()