Skip to content

Commit

Permalink
Merge pull request #1222 from vfreex/doozer-unittest-no-http-requests
Browse files Browse the repository at this point in the history
doozer: Don't send HTTP requests in unit test
  • Loading branch information
openshift-merge-bot[bot] authored Dec 17, 2024
2 parents df0ac44 + a1f98ad commit 1b778dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doozer/tests/cli/test_gen_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,9 @@ async def test_create_multi_release_manifest_list(self, open_mock, exec_mock, mi
os: linux
""".strip())

@patch("doozerlib.cli.release_gen_payload.what_is_in_master", return_value="4.19")
@patch("doozerlib.cli.release_gen_payload.modify_and_replace_api_object")
async def test_apply_multi_imagestream_update(self, mar_mock):
async def test_apply_multi_imagestream_update(self, mar_mock, _):
gpcli = flexmock(rgp_cli.GenPayloadCli(output_dir="/tmp", runtime=MagicMock(assembly_type=AssemblyTypes.STREAM)))

# make MAR method do basically what it would, without writing all the files
Expand Down Expand Up @@ -774,8 +775,9 @@ def contains(name: str):
self.assertEqual(os.getenv('BUILD_URL', ''), new_tag_annotations['release.openshift.io/build-url'])
self.assertIn('release.openshift.io/runtime-brew-event', new_tag_annotations)

@patch("doozerlib.cli.release_gen_payload.what_is_in_master", return_value="4.19")
@patch("doozerlib.cli.release_gen_payload.modify_and_replace_api_object")
async def test_apply_multi_imagestream_update_retain_accepted(self, mar_mock):
async def test_apply_multi_imagestream_update_retain_accepted(self, mar_mock, _):
gpcli = flexmock(rgp_cli.GenPayloadCli(output_dir="/tmp", runtime=MagicMock(assembly_type=AssemblyTypes.STREAM)))

# make MAR method do basically what it would, without writing all the files
Expand Down

0 comments on commit 1b778dd

Please sign in to comment.