From 907957b3ea9a2cd71145606894a95de82e63f227 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Fri, 10 May 2024 08:26:13 -0500 Subject: [PATCH] test: Avoid circular import in Azure test --- tests/unittests/reporting/test_reporting_hyperv.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittests/reporting/test_reporting_hyperv.py b/tests/unittests/reporting/test_reporting_hyperv.py index e9f2b213ff2a..31b0408d1b1e 100644 --- a/tests/unittests/reporting/test_reporting_hyperv.py +++ b/tests/unittests/reporting/test_reporting_hyperv.py @@ -11,6 +11,11 @@ from cloudinit import util from cloudinit.reporting import events, instantiated_handler_registry from cloudinit.reporting.handlers import HyperVKvpReportingHandler + +# TODO: Importing `errors` here is a hack to avoid a circular import. +# Without it, we have a azure->errors->identity->azure import loop, but +# long term we should restructure these modules to avoid the issue. +from cloudinit.sources.azure import errors # noqa: F401 from cloudinit.sources.helpers import azure from tests.unittests.helpers import CiTestCase