

def test_on_join(self):
    session = MockApplicationSession()
    exception = RuntimeError('blammo')
    session.onJoin = exception_raiser(exception)
    msg = create_mock_welcome()
    session.onMessage(msg)
    self.assertEqual(1, len(session.errors))
    self.assertEqual(exception, session.errors[0][0])

dataset/ETHPy150Open crossbario/autobahn-python/autobahn/wamp/test/test_user_handler_errors.py TestSessionCallbacks.test_on_join/original