summaryrefslogtreecommitdiff
path: root/factory/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/base.py')
-rw-r--r--factory/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/factory/base.py b/factory/base.py
index 19d441b..b2f437d 100644
--- a/factory/base.py
+++ b/factory/base.py
@@ -341,6 +341,10 @@ class Factory(BaseFactory):
# from turning it into an instance method.
_creation_function = (DJANGO_CREATION,)
+ def __str__(self):
+ return '<%s for %s>' % (self.__class__.__name__,
+ getattr(self, CLASS_ATTRIBUTE_ASSOCIATED_CLASS).__name__)
+
@classmethod
def set_creation_function(cls, creation_function):
"""Set the creation function for this class.