diff options
Diffstat (limited to 'factory')
-rw-r--r-- | factory/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/factory/base.py b/factory/base.py index 59f37eb..dde9f38 100644 --- a/factory/base.py +++ b/factory/base.py @@ -660,6 +660,14 @@ class DjangoModelFactory(Factory): return target_class._default_manager.create(*args, **kwargs) +class MogoFactory(Factory): + """Factory for mogo objects.""" + ABSTRACT_FACTORY = True + + def _build(cls, target_class, *args, **kwargs): + return target_class.new(*args, **kwargs) + + def make_factory(klass, **kwargs): """Create a new, simple factory for the given class.""" factory_name = '%sFactory' % klass.__name__ |