##// END OF EJS Templates
move notebooks api tests into notebooks/tests
Zachary Sailer -
Show More
@@ -20,15 +20,6 class APITest(NotebookTestBase):
20 20 def notebooks_url(self):
21 21 return self.base_url() + 'api/notebooks'
22 22
23 def kernels_url(self):
24 return self.base_url() + 'api/kernels'
25
26 def sessions_url(self):
27 return self.base_url() + 'api/sessions'
28
29 def contents_url(self):
30 return self.contents_url() + 'api/contents'
31
32 23 def mknb(self, name='', path='/'):
33 24 url = self.notebooks_url() + path
34 25 return url, requests.post(url)
@@ -43,7 +34,7 class APITest(NotebookTestBase):
43 34 r = requests.get(url)
44 35 self.assertEqual(r.json(), [])
45 36
46 def test_root_notebook_handler(self):
37 def test_notebook_root_handler(self):
47 38 # POST a notebook and test the dict thats returned.
48 39 url, nb = self.mknb()
49 40 data = nb.json()
@@ -58,7 +49,10 class APITest(NotebookTestBase):
58 49 assert isinstance(r.json(), list)
59 50 assert isinstance(r.json()[0], dict)
60 51
52 def test_notebook_handler(self):
61 53 # GET with a notebook name.
54 url, nb = self.mknb()
55 data = nb.json()
62 56 url = self.notebooks_url() + '/Untitled0.ipynb'
63 57 r = requests.get(url)
64 58 assert isinstance(data, dict)
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now