@@ -164,6 +164,15 @@ def check(self, d):
164164 Reference .check (self , d )
165165 LanguageInfo ().check (d ['language_info' ])
166166
167+
168+ class ConnectReply (Reference ):
169+ shell_port = Integer ()
170+ control_port = Integer ()
171+ stdin_port = Integer ()
172+ iopub_port = Integer ()
173+ hb_port = Integer ()
174+
175+
167176class CommInfoReply (Reference ):
168177 comms = Dict ()
169178
@@ -212,6 +221,7 @@ class HistoryReply(Reference):
212221 'status' : Status (),
213222 'complete_reply' : CompleteReply (),
214223 'kernel_info_reply' : KernelInfoReply (),
224+ 'connect_reply' : ConnectReply (),
215225 'comm_info_reply' : CommInfoReply (),
216226 'is_complete_reply' : IsCompleteReply (),
217227 'execute_input' : ExecuteInput (),
@@ -424,6 +434,17 @@ def test_kernel_info_request():
424434 validate_message (reply , 'kernel_info_reply' , msg_id )
425435
426436
437+ def test_connect_request ():
438+ flush_channels ()
439+ msg = KC .session .msg ('connect_request' )
440+ KC .shell_channel .send (msg )
441+ return msg ['header' ]['msg_id' ]
442+
443+ msg_id = KC .kernel_info ()
444+ reply = KC .get_shell_msg (timeout = TIMEOUT )
445+ validate_message (reply , 'connect_reply' , msg_id )
446+
447+
427448def test_comm_info_request ():
428449 flush_channels ()
429450 if not hasattr (KC , 'comm_info' ):
0 commit comments