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