klen/mixer

Add support/backend for Serializers (DjangoRestFramework, MarshMallow)?

gcavalcante8808 opened this issue · 1 comments

Hello Folks,

I was thinking about the possibility of the support for some general serializers like MarshMallow and DjangoRestFramework.

It Would Be something like:

from mixer.backends.drfserializer import mixer
from app.serializers import ProjectSerializer

project = mixer.blend(ProjectSerializer)

The biggest difference here is that we don't need to write the results to a database, just verify if the data generated is valid (call a is_valid method most the time) .

What do you think? Is this an acceptable request?

PS: I'm willing to fork and help with django rest frameworks if this request is marked as an acceptable enhancement.

klen commented

I've added basic support for Marshmallow library. If you want to provide support for django RF it's welcome.