|
1 | 1 | import sys
|
2 | 2 | from datetime import date
|
3 |
| - |
| 3 | +from unittest import mock |
4 | 4 | import pytest
|
5 | 5 |
|
6 | 6 | from commitizen import cli, git
|
@@ -533,6 +533,7 @@ def test_changelog_with_filename_as_empty_string(mocker, changelog_path, config_
|
533 | 533 |
|
534 | 534 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
535 | 535 | @pytest.mark.freeze_time("2022-02-13")
|
| 536 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
536 | 537 | def test_changelog_from_rev_first_version_from_arg(
|
537 | 538 | mocker, config_path, changelog_path, file_regression
|
538 | 539 | ):
|
@@ -564,6 +565,7 @@ def test_changelog_from_rev_first_version_from_arg(
|
564 | 565 |
|
565 | 566 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
566 | 567 | @pytest.mark.freeze_time("2022-02-13")
|
| 568 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
567 | 569 | def test_changelog_from_rev_latest_version_from_arg(
|
568 | 570 | mocker, config_path, changelog_path, file_regression
|
569 | 571 | ):
|
@@ -651,6 +653,7 @@ def test_changelog_from_rev_range_version_not_found(mocker, config_path):
|
651 | 653 |
|
652 | 654 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
653 | 655 | @pytest.mark.freeze_time("2022-02-13")
|
| 656 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
654 | 657 | def test_changelog_from_rev_version_range_including_first_tag(
|
655 | 658 | mocker, config_path, changelog_path, file_regression
|
656 | 659 | ):
|
@@ -682,6 +685,7 @@ def test_changelog_from_rev_version_range_including_first_tag(
|
682 | 685 |
|
683 | 686 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
684 | 687 | @pytest.mark.freeze_time("2022-02-13")
|
| 688 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
685 | 689 | def test_changelog_from_rev_version_range_from_arg(
|
686 | 690 | mocker, config_path, changelog_path, file_regression
|
687 | 691 | ):
|
@@ -718,6 +722,7 @@ def test_changelog_from_rev_version_range_from_arg(
|
718 | 722 |
|
719 | 723 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
720 | 724 | @pytest.mark.freeze_time("2022-02-13")
|
| 725 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
721 | 726 | def test_changelog_from_rev_version_with_big_range_from_arg(
|
722 | 727 | mocker, config_path, changelog_path, file_regression
|
723 | 728 | ):
|
@@ -772,6 +777,7 @@ def test_changelog_from_rev_version_with_big_range_from_arg(
|
772 | 777 |
|
773 | 778 | @pytest.mark.usefixtures("tmp_commitizen_project")
|
774 | 779 | @pytest.mark.freeze_time("2022-02-13")
|
| 780 | +@mock.patch("commitizen.git.GitTag.date", "2022-02-13") |
775 | 781 | def test_changelog_from_rev_latest_version_dry_run(
|
776 | 782 | mocker, capsys, config_path, changelog_path, file_regression
|
777 | 783 | ):
|
|
0 commit comments