import pytest
from azure.ml._workspace_dependent_operations import WorkspaceScope
from azure.ml._utils._arm_id_utils import get_arm_id_with_version


def test_get_arm_id(mock_workspace_scope: WorkspaceScope) -> None:
    arm_id = get_arm_id_with_version(mock_workspace_scope, "models", "modeltest", "2")
    expected_arm_id = (
        "/subscriptions/test_subscription/resourceGroups/test_resource_group"
        "/providers/Microsoft.MachineLearningServices/workspaces/test_workspace_name/models/modeltest/versions/2"
    )
    assert expected_arm_id == arm_id
