#244 Make the `test_dead_package_added_to_main_branch` test more stable
Closed a year ago by abompard. Opened a year ago by abompard.
fedora-infra/ abompard/toddlers fix-test  into  main

@@ -3,7 +3,7 @@ 

  """

  

  import logging

- from unittest.mock import MagicMock

+ from unittest.mock import MagicMock, patch

  

  import koji

  import pytest
@@ -129,7 +129,10 @@ 

              "principal": "principal",

              "keytab": "keytab",

          }

-         self.toddler_cls.process_block_retired(config, message)

+         with patch.object(

+             self.toddler_cls, "get_rawhide_tag", MagicMock(return_value="f41")

+         ):

+             self.toddler_cls.process_block_retired(config, message)

          self.toddler_cls.koji_session.packageListBlock.assert_called_once_with(

              taginfo="f41",

              pkginfo="example-repo",

Without this, the test depends on the current rawhide version retrieved from Bodhi.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/5fa227dacda14c34ad875fb33e4be39b

Pull-Request has been closed by abompard

a year ago
Metadata