Skip to content

Commit

Permalink
tests(fix): qualibration node validate options
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-v4s committed Oct 16, 2024
1 parent 7da49d9 commit 5dad8e6
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/unit/test_qualibration_node/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,21 @@ def test__validate_passed_parameters_options_with_both_parameters_and_class(
)

def test__validate_passed_parameters_options_with_none(self, mocker):
default_parameters = MagicMock()
mocker.patch(
"qualibrate.qualibration_node.NodeCreateParametersType",
return_value=default_parameters,
mocked_create_model = mocker.patch(
"qualibrate.qualibration_node.create_model"
)
result = QualibrationNode._validate_passed_parameters_options(
params = mocker.patch(
"qualibrate.qualibration_node.NodeParameters",
__name__="a",
__doc__="str",
__module__="module",
)
QualibrationNode._validate_passed_parameters_options(
name="test_node", parameters=None, parameters_class=None
)
assert result == default_parameters
mocked_create_model.assert_called_once_with(
"a", __doc__="str", __base__=params, __module__="module"
)

def test__validate_passed_parameters_options_parameters_class_instantiation_failure(
self, mock_logger
Expand Down

0 comments on commit 5dad8e6

Please sign in to comment.