diff options
Diffstat (limited to 'factory/helpers.py')
-rw-r--r-- | factory/helpers.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/factory/helpers.py b/factory/helpers.py index 4a2a254..60a4d75 100644 --- a/factory/helpers.py +++ b/factory/helpers.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (c) 2010 Mark Sandstrom -# Copyright (c) 2011-2013 Raphaël Barrois +# Copyright (c) 2011-2015 Raphaël Barrois # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -28,7 +28,6 @@ import logging from . import base from . import declarations -from . import django @contextlib.contextmanager @@ -50,7 +49,9 @@ def debug(logger='factory', stream=None): def make_factory(klass, **kwargs): """Create a new, simple factory for the given class.""" factory_name = '%sFactory' % klass.__name__ - kwargs[base.FACTORY_CLASS_DECLARATION] = klass + class Meta: + model = klass + kwargs['Meta'] = Meta base_class = kwargs.pop('FACTORY_CLASS', base.Factory) factory_class = type(base.Factory).__new__( |