Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure extension name is passed to TerminalHandler #79

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nbclassic/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def initialize_handlers(self):
ujoin = url_path_join
# Add terminal handlers
static_handlers.append(
(ujoin(base_url, r"/terminals/(\w+)"), TerminalHandler)
(ujoin(base_url, r"/terminals/(\w+)"), TerminalHandler, {"name": self.name})
)
static_handlers.append(
# (r"/nbextensions/(?!nbextensions_configurator\/list)(.*)", FileFindHandler, {
Expand Down
7 changes: 7 additions & 0 deletions nbclassic/tests/test_notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ async def test_notebook_handler(notebooks, jp_fetch):
assert "Kernel" in html
assert nbpath in html


async def test_terminal_handler(jp_fetch):
r = await jp_fetch('terminals', "1")
assert r.code == 200
# Check that the terminals template is loaded
html = r.body.decode()
assert "terminal-app" in html