Skip to content

Commit b5f770c

Browse files
committed
Fix tests
1 parent b357bca commit b5f770c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nbresuse/tests/test_basic.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def test_import_serverextension(self):
3232
"nbresuse.ResourceUseDisplay"
3333
) as resource_use_display_mock, patch(
3434
"nbresuse.PrometheusHandler"
35-
) as prometheus_handler_mock:
35+
) as prometheus_handler_mock, patch(
36+
"nbresuse.PSUtilMetricsLoader"
37+
) as psutil_metrics_loader:
3638

3739
# load up with mock
3840
load_jupyter_server_extension(nbapp_mock)
@@ -45,4 +47,6 @@ def test_import_serverextension(self):
4547
# prometheus
4648
assert periodic_callback_mock.return_value.start.call_count == 1
4749
assert prometheus_handler_mock.call_count == 1
48-
prometheus_handler_mock.assert_called_with(nbapp_mock)
50+
prometheus_handler_mock.assert_called_with(
51+
psutil_metrics_loader(nbapp_mock)
52+
)

0 commit comments

Comments
 (0)