DataDesigner/tests/cli/commands/test_models_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
834 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.models import models_command
from data_designer.cli.controllers.model_controller import ModelController
from data_designer.config.utils.constants import DATA_DESIGNER_HOME
@patch("data_designer.cli.commands.models.ModelController")
def test_models_command(mock_model_controller):
mock_model_controller_instance = MagicMock(spec=ModelController)
mock_model_controller.return_value = mock_model_controller_instance
models_command()
mock_model_controller.assert_called_once()
mock_model_controller.call_args[0][0] == DATA_DESIGNER_HOME
mock_model_controller_instance.run.assert_called_once()