in jupytertestutil/jupytertestutil.go [446:460]
func (m *mockJupyter) getSession(w http.ResponseWriter, r *http.Request, sessionID string) {
m.mu.Lock()
defer m.mu.Unlock()
s, ok := m.sessions[sessionID]
if !ok {
http.NotFound(w, r)
return
}
resp, err := json.Marshal(s)
if err != nil {
http.Error(w, fmt.Sprintf("failed to marshal session: %v", err), http.StatusInternalServerError)
return
}
w.Write(resp)
}