

@patch('twisted.internet.reactor')
def test_runner_default(self, fakereactor):
    fakereactor.connectTCP = Mock(side_effect=raise_error)
    runner = ApplicationRunner('ws://fake:1234/ws', 'dummy realm')
    self.assertRaises(RuntimeError, runner.run, raise_error)
    self.assertEqual(fakereactor.run.call_count, 1)
    self.assertEqual(fakereactor.stop.call_count, 1)

dataset/ETHPy150Open crossbario/autobahn-python/autobahn/twisted/test/test_application_runner.py TestApplicationRunner.test_runner_default/original