summaryrefslogtreecommitdiff
path: root/factory/helpers.py
diff options
context:
space:
mode:
authorIlya Pirogov <ilja.pirogov@gmail.com>2014-01-13 17:53:03 +0400
committerRaphaƫl Barrois <raphael.barrois@polytechnique.org>2014-01-21 23:11:06 +0100
commit9323fbeea374394833987cb710ac9becb7726a44 (patch)
tree881093f65a2606fae8d8aee061504583e9e5b86c /factory/helpers.py
parent402138768870871ef38b5c01ccaec957aa771d26 (diff)
downloadfactory-boy-9323fbeea374394833987cb710ac9becb7726a44.tar
factory-boy-9323fbeea374394833987cb710ac9becb7726a44.tar.gz
Added "prevent_signals" decorator/context manager
Diffstat (limited to 'factory/helpers.py')
-rw-r--r--factory/helpers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/factory/helpers.py b/factory/helpers.py
index 37b41bf..719d76d 100644
--- a/factory/helpers.py
+++ b/factory/helpers.py
@@ -28,6 +28,7 @@ import logging
from . import base
from . import declarations
+from . import django
@contextlib.contextmanager
@@ -139,3 +140,7 @@ def container_attribute(func):
def post_generation(fun):
return declarations.PostGeneration(fun)
+
+
+def prevent_signals(*signals):
+ return django.PreventSignals(*signals) \ No newline at end of file