def test_call_without_optional_input_args(self, mocker, mocks_init_class, test_data): mock_run = mocker.patch.object(ProcessAPI, "run") process('some_dataset') assert_mock_init_class(mocks_init_class) assert mock_run.called
def test_call_with_all_input_args(self, mocker, mocks_init_class, test_data): mock_run = mocker.patch.object(ProcessAPI, "run") process(test_data["dataset"], test_data["task"], test_data["verbose"]) assert_mock_init_class(mocks_init_class) assert mock_run.called
def test_call__raises_error_too_many_args(self, mocker): with pytest.raises(TypeError): process('some_dataset', 'some_task', True, 'extra_field')
def test_call__raises_error_no_inputs(self, mocker): with pytest.raises(TypeError): process()