Skip to content

Instantly share code, notes, and snippets.

View coler-j's full-sized avatar

Cole Jancsar coler-j

  • Solvecore inc
  • Canada
View GitHub Profile
@JordanReiter
JordanReiter / signal_testcase.py
Last active March 4, 2019 20:21
Simple TestCase Mixin for testing whether signals are fired, and testing for specific signal values
from contextlib import contextmanager
from django.dispatch.dispatcher import Signal
class SignalTestMixin(object):
'''
Add this as a mixin to any Django TestCase
that needs to add testing for signals.