Skip to content

Commit

Permalink
fix issues with jupyter_events 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer committed Sep 12, 2022
1 parent ee55c5f commit efcbca0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/services/events/mock_event.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$id: event.mock.jupyter.org/message
$id: http://event.mock.jupyter.org/message
version: 1
title: Message
description: |
Expand Down
2 changes: 1 addition & 1 deletion tests/services/events/mockextension/mock_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class MockEventHandler(JupyterHandler):
def get(self):
# Emit an event.
self.event_logger.emit(
schema_id="event.mockextension.jupyter.org/message",
schema_id="http://event.mockextension.jupyter.org/message",
data={"event_message": "Hello world, from mock extension!"},
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$id: event.mockextension.jupyter.org/message
$id: http://event.mockextension.jupyter.org/message
version: 1
title: Message
description: |
Expand Down
14 changes: 7 additions & 7 deletions tests/services/events/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def test_subscribe_websocket(event_logger, jp_ws_fetch):
ws = await jp_ws_fetch("/api/events/subscribe")

event_logger.emit(
schema_id="event.mock.jupyter.org/message",
schema_id="http://event.mock.jupyter.org/message",
data={"event_message": "Hello, world!"},
)
# await event_logger.gather_listeners()
Expand All @@ -44,7 +44,7 @@ async def test_subscribe_websocket(event_logger, jp_ws_fetch):

payload_1 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"version": 1,
"data": {
"event_message": "Hello, world!"
Expand All @@ -55,7 +55,7 @@ async def test_subscribe_websocket(event_logger, jp_ws_fetch):

payload_2 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"version": 1,
"data": {
"event_message": "Hello, world!"
Expand Down Expand Up @@ -83,7 +83,7 @@ async def test_post_event(jp_fetch, event_logger_sink, payload):

payload_3 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"data": {
"event_message": "Hello, world!"
}
Expand All @@ -101,7 +101,7 @@ async def test_post_event(jp_fetch, event_logger_sink, payload):

payload_5 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"version": 1
}
"""
Expand All @@ -128,7 +128,7 @@ async def test_post_event_400(jp_fetch, event_logger, payload):

payload_7 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"version": 1,
"data": {
"message": "Hello, world!"
Expand All @@ -138,7 +138,7 @@ async def test_post_event_400(jp_fetch, event_logger, payload):

payload_8 = """\
{
"schema_id": "event.mock.jupyter.org/message",
"schema_id": "http://event.mock.jupyter.org/message",
"version": 2,
"data": {
"message": "Hello, world!"
Expand Down
2 changes: 1 addition & 1 deletion tests/services/events/test_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def jp_server_config():
"ServerApp": {
"jpserver_extensions": {"tests.services.events.mockextension": True},
},
"EventBus": {"allowed_schemas": ["event.mockextension.jupyter.org/message"]},
"EventBus": {"allowed_schemas": ["http://event.mockextension.jupyter.org/message"]},
}
return config

Expand Down

0 comments on commit efcbca0

Please sign in to comment.