for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from contextlib import contextmanager
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
try:
from unittest import mock
except ImportError:
import mock
@contextmanager
def catch_signal(signal):
"""Catch django signal and return the mocked call."""
handler = mock.Mock()
signal.connect(handler)
yield handler
signal.disconnect(handler)
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.