

def test_signals(self):
    'Make sure the signals are fired.'
    _signals_fired = []

    def _connect_sidebar(sender, **kwargs):
        _signals_fired.append('sidebar')

    def _connect_header(sender, **kwargs):
        _signals_fired.append('header')
    registry.connect('sidebar_start', _connect_sidebar)
    registry.connect('header_end', _connect_header)
    _signals_fired.client.get('/')
    self.assertEquals(len(_signals_fired), 2)
    self.assertTrue(('sidebar' in _signals_fired))
    self.assertTrue(('header' in _signals_fired))

dataset/ETHPy150Open weluse/django-templatehooks/tests/base/tests.py TemplateHooksDisabledTestCase.test_signals/VarMisuse@75/129 `self`->`_signals_fired`