Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dstack/_internal/core/backends/azure/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from azure.core.credentials import TokenCredential
from azure.mgmt import msi as msi_mgmt
from azure.mgmt import network as network_mgmt
from azure.mgmt import resource as resource_mgmt
from azure.mgmt import subscription as subscription_mgmt
from azure.mgmt.network.models import (
AddressSpace,
Expand All @@ -18,6 +17,7 @@
Subnet,
VirtualNetwork,
)
from azure.mgmt.resource import resources as resource_mgmt
from azure.mgmt.resource.resources.models import ResourceGroup

from dstack._internal.core.backends.azure import auth, compute, resources
Expand Down
12 changes: 9 additions & 3 deletions src/tests/_internal/server/routers/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,15 @@ async def test_create_azure_backend(self, test_db, session: AsyncSession, client
}
with (
patch("dstack._internal.core.backends.azure.auth.authenticate") as authenticate_mock,
patch("azure.mgmt.subscription.SubscriptionClient") as SubscriptionClientMock,
patch("azure.mgmt.resource.ResourceManagementClient") as ResourceManagementClientMock,
patch("azure.mgmt.network.NetworkManagementClient") as NetworkManagementClientMock,
patch(
"dstack._internal.core.backends.azure.configurator.subscription_mgmt.SubscriptionClient"
) as SubscriptionClientMock,
patch(
"dstack._internal.core.backends.azure.configurator.resource_mgmt.ResourceManagementClient"
) as ResourceManagementClientMock,
patch(
"dstack._internal.core.backends.azure.configurator.network_mgmt.NetworkManagementClient"
) as NetworkManagementClientMock,
):
authenticate_mock.return_value = None, "test_tenant"
subscription_client_mock = SubscriptionClientMock.return_value
Expand Down
Loading