def setUp(self):
    self._mock_channel_service_stub = MockChannelServiceStub()
    self._old_get_channel_stub = channel._get_channel_stub
    channel._get_channel_stub = lambda: self._mock_channel_service_stub
    self._channel_app = channel.application
    self._output = StringIO.StringIO()
Set up the mocks and output objects for tests.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/channel_test.py/DevAppserverChannelTest.setUp