8000 test(test_changelog): fix test · commitizen-tools/commitizen@66b4480 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66b4480

Browse files

Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_init_without_setup_pre_commit_hook(tmpdir, mocker: MockFixture, config)
8787
def test_init_when_config_already_exists(config, capsys):
8888
# Set config path
8989
path = os.sep.join(["tests", "pyproject.toml"])
90-
config.path = Path(path)
90+
config.update_path(path)
9191

9292
commands.Init(config)()
9393
captured = capsys.readouterr()
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,9 @@ def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture):
16411641

16421642
def test_changelog_file_name_from_args_and_config():
16431643
mock_config = Mock(spec=BaseConfig)
1644-
mock_config.path.parent = "/my/project"
1644+
mock_path = Mock(spec=Path)
1645+
mock_path.parent = Path("/my/project")
1646+
mock_config.path = mock_path
16451647
mock_config.settings = {
16461648
"name": "cz_conventional_commits",
16471649
"changelog_file": "CHANGELOG.md",