From cb5edda2be42f2eb0a06b2a34a093c38e3e39fbc Mon Sep 17 00:00:00 2001 From: Yannik Tausch Date: Mon, 25 Nov 2024 17:15:13 +0100 Subject: [PATCH] fix tests --- tests/test_cli.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ff2bd62ca0..ca35b98df2 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -141,19 +141,34 @@ def test_cli_mock_commands_pass_context( @pytest.mark.parametrize("job, n_jobs", [(1, 5), (3, 7), (4, 4)]) -@pytest.mark.parametrize("package", ["foo", "bar", "baz"]) +@pytest.mark.parametrize("feedstock", ["foo", "bar"]) @mock.patch("conda_forge_tick.update_upstream_versions.main") def test_cli_mock_update_upstream_versions( - cmd_mock: MagicMock, job: int, n_jobs: int, package: str + cmd_mock: MagicMock, job: int, n_jobs: int, feedstock: str ): runner = CliRunner() result = runner.invoke( main, - ["update-upstream-versions", f"--job={job}", f"--n-jobs={n_jobs}", package], + ["update-upstream-versions", f"--job={job}", f"--n-jobs={n_jobs}", feedstock], ) assert result.exit_code == 0 - cmd_mock.assert_called_once_with(mock.ANY, job=job, n_jobs=n_jobs, package=package) + cmd_mock.assert_called_once_with( + mock.ANY, job=job, n_jobs=n_jobs, feedstock=feedstock + ) + + +@pytest.mark.parametrize("feedstock", ["foo", "bar"]) +@mock.patch("conda_forge_tick.auto_tick.main") +def test_cli_mock_auto_tick(cmd_mock: MagicMock, feedstock: str): + runner = CliRunner() + result = runner.invoke( + main, + ["update-upstream-versions", feedstock], + ) + + assert result.exit_code == 0 + cmd_mock.assert_called_once_with(mock.ANY, feedstock=feedstock) @pytest.mark.parametrize("job, n_jobs", [(1, 5), (3, 7), (4, 4)])