mirror of
https://github.com/NVIDIA-NeMo/DataDesigner
synced 2026-05-24 09:48:29 +00:00
* 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
18 lines
834 B
Python
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()
|