def onElement(self, element):
        if (element.uri, element.name) == (self.namespace, 'handshake'):
            self.onHandshake(unicode(element))
        else:
            exc = error.StreamError('not-authorized')
            self.xmlstream.sendStreamError(exc)
Check correct signal handling in Scheduler.run().
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/protocols/jabber/component.py/ListenComponentAuthenticator.onElement--crossover with--dataset/ETHPy150Open ui/rq-scheduler/tests/test_scheduler.py/TestScheduler.test_run