in jupytertestutil/jupytertestutil.go [575:588]
func (m *mockJupyter) shouldFailRequest(r *http.Request) bool {
if r.Method != http.MethodGet {
return false
}
if !m.injectErrors {
return false
}
m.mu.Lock()
defer m.mu.Unlock()
if m.lastCalledPath != r.URL.Path {
return true
}
return time.Since(m.firstCalledTime) < time.Second
}