DataDesigner/tests/cli/commands/test_providers_command.py
Johnny Greco f8c201e085
chore: update header script to check for diffs (#195)
* update script

* update headers

* refactor a bit and add test script

* update headers

* update for edge case

* update headers

* add step to get file creation date

* use git history to get copyright year

* generation type is printed with inference parameters

* fix unit test
2026-01-09 17:10:58 -05:00

18 lines
882 B
Python

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from unittest.mock import MagicMock, patch
from data_designer.cli.commands.providers import providers_command
from data_designer.cli.controllers.provider_controller import ProviderController
from data_designer.config.utils.constants import DATA_DESIGNER_HOME
@patch("data_designer.cli.commands.providers.ProviderController")
def test_providers_command(mock_provider_controller):
mock_provider_controller_instance = MagicMock(spec=ProviderController)
mock_provider_controller.return_value = mock_provider_controller_instance
providers_command()
mock_provider_controller.assert_called_once()
mock_provider_controller.call_args[0][0] == DATA_DESIGNER_HOME
mock_provider_controller_instance.run.assert_called_once()