diff options
author | Ilya Pirogov <ilja.pirogov@gmail.com> | 2014-01-13 17:53:03 +0400 |
---|---|---|
committer | Raphaƫl Barrois <raphael.barrois@polytechnique.org> | 2014-01-21 23:11:06 +0100 |
commit | 9323fbeea374394833987cb710ac9becb7726a44 (patch) | |
tree | 881093f65a2606fae8d8aee061504583e9e5b86c /factory/helpers.py | |
parent | 402138768870871ef38b5c01ccaec957aa771d26 (diff) | |
download | factory-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.py | 5 |
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 |