Skip to content

Commit

Permalink
add connections to sessions API tests
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Nov 18, 2016
1 parent 6b2e5ae commit 4826fe9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions notebook/services/sessions/tests/test_sessionmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def _new_id(self):
def start_kernel(self, kernel_id=None, path=None, kernel_name='python', **kwargs):
kernel_id = kernel_id or self._new_id()
k = self._kernels[kernel_id] = DummyKernel(kernel_name=kernel_name)
self._kernel_connections[kernel_id] = 0
k.last_activity = dummy_date
k.execution_state = 'idle'
return kernel_id
Expand Down Expand Up @@ -74,6 +75,7 @@ def test_get_session(self):
'kernel': {
'id': 'A',
'name': 'bar',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}}
Expand Down Expand Up @@ -116,6 +118,7 @@ def test_list_sessions(self):
'kernel': {
'id': 'A',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand All @@ -127,6 +130,7 @@ def test_list_sessions(self):
'kernel': {
'id': 'B',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand All @@ -138,6 +142,7 @@ def test_list_sessions(self):
'kernel': {
'id': 'C',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand All @@ -164,6 +169,7 @@ def test_list_sessions_dead_kernel(self):
'kernel': {
'id': 'B',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand All @@ -185,6 +191,7 @@ def test_update_session(self):
'kernel': {
'id': 'A',
'name':'julia',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand Down Expand Up @@ -216,6 +223,7 @@ def test_delete_session(self):
'kernel': {
'id': 'A',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand All @@ -227,6 +235,7 @@ def test_delete_session(self):
'kernel': {
'id': 'C',
'name':'python',
'connections': 0,
'last_activity': dummy_date_s,
'execution_state': 'idle',
}
Expand Down

0 comments on commit 4826fe9

Please sign in to comment.