##// END OF EJS Templates
Added base class for Notebook API tests.
Added base class for Notebook API tests.

File last commit:

r13038:edf21ed7
r13038:edf21ed7
Show More
test_api.py
23 lines | 517 B | text/x-python | PythonLexer
Brian E. Granger
Added base class for Notebook API tests.
r13038 """Test the kernels service API."""
import os
import sys
import json
import requests
from IPython.html.tests.launchnotebook import NotebookTestBase
class KernelAPITest(NotebookTestBase):
"""Test the kernels web service API"""
def base_url(self):
return super(KernelAPITest,self).base_url() + 'api/kernels'
def test_no_kernels(self):
"""Make sure there are no kernels running at the start"""
url = self.base_url()
r = requests.get(url)
assert r.json() == []