def test_connect_and_send(self):
        def func_a(signal, sender, **kwargs):
            self._kwargs_a = kwargs

        def func_b(signal, sender, extra, **kwargs):
            self._extra_b = extra

        def func_c(sender, extra, **kwargs):
            self._extra_c = extra

        def func_d(extra, **kwargs):
            # kwargs will contain *sender* and *signal*
            self._extra_d = extra

        hook.connect("foo-hook", func_a, sender=FakeHook)
        hook.connect("foo-hook", func_b, sender=FakeHook)
        hook.connect("foo-hook", func_c, sender=FakeHook)
        hook.connect("foo-hook", func_d, sender=FakeHook)
        hook.send("foo-hook", sender=FakeHook, extra="foobar")
        self.assertDictEqual(self._kwargs_a, {'extra': "foobar", })
        self.assertEqual(self._extra_b, "foobar")
        self.assertEqual(self._extra_c, "foobar")
        self.assertEqual(self._extra_d, "foobar")
Like git.repo.isRevisionOrPath(), but handles commit aliases too.
dataset/ETHPy150Open nitely/django-hooks/hooks/tests/tests_signalhook.py/SignalHookTest.test_connect_and_send--crossover with--dataset/ETHPy150Open facebookarchive/git-review/src/gitreview/review/__init__.py/Review.isRevisionOrPath