Show More
@@ -20,15 +20,6 b' class APITest(NotebookTestBase):' | |||||
20 | def notebooks_url(self): |
|
20 | def notebooks_url(self): | |
21 | return self.base_url() + 'api/notebooks' |
|
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 | def mknb(self, name='', path='/'): |
|
23 | def mknb(self, name='', path='/'): | |
33 | url = self.notebooks_url() + path |
|
24 | url = self.notebooks_url() + path | |
34 | return url, requests.post(url) |
|
25 | return url, requests.post(url) | |
@@ -43,7 +34,7 b' class APITest(NotebookTestBase):' | |||||
43 | r = requests.get(url) |
|
34 | r = requests.get(url) | |
44 | self.assertEqual(r.json(), []) |
|
35 | self.assertEqual(r.json(), []) | |
45 |
|
36 | |||
46 |
def test_ |
|
37 | def test_notebook_root_handler(self): | |
47 | # POST a notebook and test the dict thats returned. |
|
38 | # POST a notebook and test the dict thats returned. | |
48 | url, nb = self.mknb() |
|
39 | url, nb = self.mknb() | |
49 | data = nb.json() |
|
40 | data = nb.json() | |
@@ -58,7 +49,10 b' class APITest(NotebookTestBase):' | |||||
58 | assert isinstance(r.json(), list) |
|
49 | assert isinstance(r.json(), list) | |
59 | assert isinstance(r.json()[0], dict) |
|
50 | assert isinstance(r.json()[0], dict) | |
60 |
|
51 | |||
|
52 | def test_notebook_handler(self): | |||
61 | # GET with a notebook name. |
|
53 | # GET with a notebook name. | |
|
54 | url, nb = self.mknb() | |||
|
55 | data = nb.json() | |||
62 | url = self.notebooks_url() + '/Untitled0.ipynb' |
|
56 | url = self.notebooks_url() + '/Untitled0.ipynb' | |
63 | r = requests.get(url) |
|
57 | r = requests.get(url) | |
64 | assert isinstance(data, dict) |
|
58 | assert isinstance(data, dict) |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now