def test_environ_headers(self):
    self.headers.extend((('SCRIPT_NAME', 'script'), ('CONTENT-TYPE', 'text/plain'), ('CONTENT-LENGTH', '209'), ('X_TEST', '123'), ('X_TEST', '456')))
    environ = self._make_one()
    self.assertEqual(environ['CONTENT_TYPE'], 'text/plain')
    self.assertEqual(environ['CONTENT_LENGTH'], '209')
    self.assertEqual(environ['HTTP_X_TEST'], '123,456')
    self.assertEqual(environ['SCRIPT_NAME'], 'script')
    self.assertEqual(environ['SERVER_NAME'], 'python.org')
    self.assertEqual(environ['SERVER_PORT'], '80')
    get_extra_info_calls = self.transport.get_extra_info.mock_calls
    expected_calls = [mock.call('socket'), mock.call('peername')]
    self.assertEqual(expected_calls, get_extra_info_calls)
def test_environ_headers(self):
    self.headers.extend((('SCRIPT_NAME', 'script'), ('CONTENT-TYPE', 'text/plain'), ('CONTENT-LENGTH', '209'), ('X_TEST', '123'), ('X_TEST', '456')))
    environ = self._make_one()
    self.assertEqual(environ['CONTENT_TYPE'], 'text/plain')
    self.assertEqual(environ['CONTENT_LENGTH'], '209')
    self.assertEqual(environ['HTTP_X_TEST'], '123,456')
    self.assertEqual(environ['SCRIPT_NAME'], 'script')
    self.assertEqual(environ['SERVER_NAME'], 'python.org')
    self.assertEqual(environ['SERVER_PORT'], '80')
    get_extra_info_calls = self.transport.get_extra_info.mock_calls
    expected_calls = [mock.call('socket'), mock.call('peername')]
    self.assertEqual(expected_calls, get_extra_info_calls)