summaryrefslogtreecommitdiff
path: root/factory/base.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-15 01:45:27 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-15 01:45:27 +0100
commit624aedf03974bedb34349d0664fb863935e99969 (patch)
treecf215ccba3100304faa3aeee6e2dc67988393250 /factory/base.py
parent66e4f2eadeae535e10f2318d4d4ed7041337ce5d (diff)
downloadfactory-boy-624aedf03974bedb34349d0664fb863935e99969.tar
factory-boy-624aedf03974bedb34349d0664fb863935e99969.tar.gz
Make the Factory class Py3 compatible.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'factory/base.py')
-rw-r--r--factory/base.py14
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