

def test_call_start_response_after_called_write(self):
    write_fn = self.start_response('200 OK', [])
    write_fn('Body\n')
    try:
        raise Exception()
    except:
        import sys
        exec_info = sys.exc_info()
        self.assertRaises(exec_info[0], self.start_response, '500 Server Error', [], exec_info)

dataset/ETHPy150Open daltonmatos/wsgid/tests/unit/startresponse_test.py StartResponseTest.test_call_start_response_after_called_write/original