diff options
author | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2011-05-16 15:32:05 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2011-05-16 15:32:05 +0200 |
commit | e42516b995053d0d5f8d4d13a94cea4953ea1850 (patch) | |
tree | 88ee97bc82460f2c7d2b7a06ff3c131cd5e70f47 /factory/base.py | |
parent | e3ec551cc6895a40e0cb1167e06fa4fba71a2a7c (diff) | |
download | factory-boy-e42516b995053d0d5f8d4d13a94cea4953ea1850.tar factory-boy-e42516b995053d0d5f8d4d13a94cea4953ea1850.tar.gz |
Prevent inherited classes from affecting superclasses.
Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
Diffstat (limited to 'factory/base.py')
-rw-r--r-- | factory/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/base.py b/factory/base.py index 733b130..d38c82d 100644 --- a/factory/base.py +++ b/factory/base.py @@ -77,7 +77,7 @@ class BaseFactoryMetaClass(type): # If this isn't a subclass of Factory, don't do anything special. return super(BaseFactoryMetaClass, cls).__new__(cls, class_name, bases, attrs) - declarations = getattr(base, CLASS_ATTRIBUTE_DECLARATIONS, DeclarationsHolder()) + declarations = DeclarationsHolder(defaults=getattr(base, CLASS_ATTRIBUTE_DECLARATIONS, {})) attrs = declarations.update_base(attrs) attrs[CLASS_ATTRIBUTE_DECLARATIONS] = declarations |