##// END OF EJS Templates
Fix session API tests
Thomas Kluyver -
Show More
@@ -42,7 +42,7 b' class SessionAPI(object):'
42 return self._req('POST', '', body)
42 return self._req('POST', '', body)
43
43
44 def modify(self, id, name, path):
44 def modify(self, id, name, path):
45 body = json.dumps({'name':name, 'path':path})
45 body = json.dumps({'notebook': {'name':name, 'path':path}})
46 return self._req('PATCH', id, body)
46 return self._req('PATCH', id, body)
47
47
48 def delete(self, id):
48 def delete(self, id):
@@ -89,7 +89,7 b' class SessionAPITest(NotebookTestBase):'
89
89
90 # Retrieve it
90 # Retrieve it
91 sid = newsession['id']
91 sid = newsession['id']
92 got = self.sess_api.get(sid)
92 got = self.sess_api.get(sid).json()
93 self.assertEqual(got, newsession)
93 self.assertEqual(got, newsession)
94
94
95 def test_delete(self):
95 def test_delete(self):
@@ -110,5 +110,5 b' class SessionAPITest(NotebookTestBase):'
110
110
111 changed = self.sess_api.modify(sid, 'nb2.ipynb', '').json()
111 changed = self.sess_api.modify(sid, 'nb2.ipynb', '').json()
112 self.assertEqual(changed['id'], sid)
112 self.assertEqual(changed['id'], sid)
113 self.assertEqual(newsession['notebook']['name'], 'nb2.ipynb')
113 self.assertEqual(changed['notebook']['name'], 'nb2.ipynb')
114 self.assertEqual(newsession['notebook']['path'], '')
114 self.assertEqual(changed['notebook']['path'], '')
General Comments 0
You need to be logged in to leave comments. Login now