Skip to content

Commit 66b4480

Browse files
committed
test(test_changelog): fix test
1 parent 7d6d78e commit 66b4480

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/commands/test_init_command.py

Lines changed: 1 addition & 1 deletion
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()

tests/test_changelog.py

Lines changed: 3 additions & 1 deletion
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",

0 commit comments

Comments
 (0)