##// END OF EJS Templates
name isn't part of inspect_reply...
Min RK -
Show More
@@ -292,7 +292,6 b' class V4toV5(Adapter):'
292 content = msg['content']
292 content = msg['content']
293 new_content = msg['content'] = {'status' : 'ok'}
293 new_content = msg['content'] = {'status' : 'ok'}
294 found = new_content['found'] = content['found']
294 found = new_content['found'] = content['found']
295 new_content['name'] = content['oname']
296 new_content['data'] = data = {}
295 new_content['data'] = data = {}
297 new_content['metadata'] = {}
296 new_content['metadata'] = {}
298 if found:
297 if found:
@@ -155,7 +155,7 b' class V4toV5TestCase(AdapterTest):'
155
155
156 def test_object_info_reply(self):
156 def test_object_info_reply(self):
157 msg = self.msg("object_info_reply", {
157 msg = self.msg("object_info_reply", {
158 'oname' : 'foo',
158 'name' : 'foo',
159 'found' : True,
159 'found' : True,
160 'status' : 'ok',
160 'status' : 'ok',
161 'definition' : 'foo(a=5)',
161 'definition' : 'foo(a=5)',
@@ -165,10 +165,26 b' class V4toV5TestCase(AdapterTest):'
165 self.assertEqual(v5['header']['msg_type'], 'inspect_reply')
165 self.assertEqual(v5['header']['msg_type'], 'inspect_reply')
166 v4c = v4['content']
166 v4c = v4['content']
167 v5c = v5['content']
167 v5c = v5['content']
168 self.assertEqual(sorted(v5c), [ 'data', 'found', 'metadata', 'name', 'status'])
168 self.assertEqual(sorted(v5c), [ 'data', 'found', 'metadata', 'status'])
169 text = v5c['data']['text/plain']
169 text = v5c['data']['text/plain']
170 self.assertEqual(text, '\n'.join([v4c['definition'], v4c['docstring']]))
170 self.assertEqual(text, '\n'.join([v4c['definition'], v4c['docstring']]))
171
171
172 def test_object_info_reply_not_found(self):
173 msg = self.msg("object_info_reply", {
174 'name' : 'foo',
175 'found' : False,
176 })
177 v4, v5 = self.adapt(msg)
178 self.assertEqual(v5['header']['msg_type'], 'inspect_reply')
179 v4c = v4['content']
180 v5c = v5['content']
181 self.assertEqual(v5c, {
182 'status': 'ok',
183 'found': False,
184 'data': {},
185 'metadata': {},
186 })
187
172 def test_kernel_info_reply(self):
188 def test_kernel_info_reply(self):
173 msg = self.msg("kernel_info_reply", {
189 msg = self.msg("kernel_info_reply", {
174 'language': 'python',
190 'language': 'python',
General Comments 0
You need to be logged in to leave comments. Login now