diff --git a/tests/integration/test_pr_comment.py b/tests/integration/test_pr_comment.py index edc5a3768..39e2443e7 100644 --- a/tests/integration/test_pr_comment.py +++ b/tests/integration/test_pr_comment.py @@ -24,7 +24,7 @@ from packit.distgit import DistGit from packit.exceptions import PackitConfigException from packit.local_project import LocalProject, LocalProjectBuilder -from packit.upstream import Upstream +from packit.upstream import GitUpstream from packit.utils.koji_helper import KojiHelper from packit_service.config import ServiceConfig from packit_service.constants import ( @@ -2657,7 +2657,7 @@ def test_pull_from_upstream_retrigger_via_dist_git_pr_comment(pagure_pr_comment_ AuthMethod.token ).once() - flexmock(Upstream).should_receive("get_last_tag").and_return("7.0.3") + flexmock(GitUpstream).should_receive("get_last_tag").and_return("7.0.3") flexmock(Allowlist, check_and_report=True) flexmock(PackitAPIWithDownstreamMixin).should_receive("is_packager").and_return( diff --git a/tests/unit/test_koji_build.py b/tests/unit/test_koji_build.py index 31b8a5162..f54afdadc 100644 --- a/tests/unit/test_koji_build.py +++ b/tests/unit/test_koji_build.py @@ -16,7 +16,7 @@ PackageConfig, ) from packit.exceptions import PackitCommandFailedError -from packit.upstream import Upstream +from packit.upstream import GitUpstream from packit_service import sentry_integration from packit_service.config import ServiceConfig from packit_service.models import ( @@ -168,7 +168,7 @@ def test_koji_build_check_names( flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm") # koji build - flexmock(Upstream).should_receive("koji_build").and_return( + flexmock(GitUpstream).should_receive("koji_build").and_return( "Uploading srpm: /python-ogr-0.11.1" ".dev21+gf2dec9b-1.20200407142424746041.21.gf2dec9b.fc31.src.rpm\n" "[====================================] 100% 00:00:11 1.67 MiB 148.10 KiB/sec\n" @@ -370,7 +370,7 @@ def test_koji_build_with_multiple_targets( flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm") # koji build - flexmock(Upstream).should_receive("koji_build").and_return( + flexmock(GitUpstream).should_receive("koji_build").and_return( "Uploading srpm: /python-ogr-0.11.1" ".dev21+gf2dec9b-1.20200407142424746041.21.gf2dec9b.fc31.src.rpm\n" "[====================================] 100% 00:00:11 1.67 MiB 148.10 KiB/sec\n" @@ -447,7 +447,9 @@ def test_koji_build_failed(github_pr_event, add_pull_request_event_with_sha_528b # koji build flexmock(sentry_integration).should_receive("send_to_sentry").and_return().once() - flexmock(Upstream).should_receive("koji_build").and_raise(Exception, "some error") + flexmock(GitUpstream).should_receive("koji_build").and_raise( + Exception, "some error" + ) result = helper.run_koji_build() assert not result["success"] @@ -569,7 +571,7 @@ def test_koji_build_targets_override( flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm") # koji build - flexmock(Upstream).should_receive("koji_build").once().with_args( + flexmock(GitUpstream).should_receive("koji_build").once().with_args( scratch=True, nowait=True, koji_target="bright-future",