diff --git a/kedro-telemetry/tests/test_plugin.py b/kedro-telemetry/tests/test_plugin.py index 979b46320..7348d63f4 100644 --- a/kedro-telemetry/tests/test_plugin.py +++ b/kedro-telemetry/tests/test_plugin.py @@ -312,7 +312,7 @@ def test_before_command_run_anonymous(self, mocker, fake_metadata): mocked_anon_id = mocker.patch("kedro_telemetry.plugin._hash") mocked_anon_id.return_value = "digested" mocker.patch("kedro_telemetry.plugin.PACKAGE_NAME", "spaceflights") - mocker.patch("builtins.open", side_effect=Exception) + mocker.patch("builtins.open", side_effect=OSError) mocked_heap_call = mocker.patch("kedro_telemetry.plugin._send_heap_event") telemetry_hook = KedroTelemetryCLIHooks()