diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-03-15 01:45:27 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-03-15 01:45:27 +0100 |
commit | 624aedf03974bedb34349d0664fb863935e99969 (patch) | |
tree | cf215ccba3100304faa3aeee6e2dc67988393250 | |
parent | 66e4f2eadeae535e10f2318d4d4ed7041337ce5d (diff) | |
download | factory-boy-624aedf03974bedb34349d0664fb863935e99969.tar factory-boy-624aedf03974bedb34349d0664fb863935e99969.tar.gz |
Make the Factory class Py3 compatible.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
-rw-r--r-- | factory/base.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/factory/base.py b/factory/base.py index 17bd267..f3d5eab 100644 --- a/factory/base.py +++ b/factory/base.py @@ -508,18 +508,18 @@ class BaseFactory(object): return cls.generate_batch(strategy, size, **kwargs) -class Factory(BaseFactory): - """Factory base with build and create support. +Factory = FactoryMetaClass('Factory', (BaseFactory,), { + 'ABSTRACT_FACTORY': True, + 'FACTORY_STRATEGY': CREATE_STRATEGY, + '__doc__': """Factory base with build and create support. This class has the ability to support multiple ORMs by using custom creation functions. - """ - __metaclass__ = FactoryMetaClass - - ABSTRACT_FACTORY = True - FACTORY_STRATEGY = CREATE_STRATEGY + """, + }) +# Backwards compatibility Factory.AssociatedClassError = AssociatedClassError |