diff --git a/test/test_repolib.py b/test/test_repolib.py index 9cc8ee481..1fda7f5dd 100644 --- a/test/test_repolib.py +++ b/test/test_repolib.py @@ -463,6 +463,18 @@ def test_ui_repoid_vars(self): c2 = self._find_content(content, "c2") self.assertEqual(None, c2["ui_repoid_vars"]) + @patch.object(repolib, "conf", ConfigFromString(config_string=USE_OS_RELEASE_PRODUCT_DISABLED)) + def test_use_os_release_product_is_disabled(self): + update_action = RepoUpdateActionCommand() + enabled = update_action.use_os_release_product_enabled() + self.assertFalse(enabled) + + @patch.object(repolib, "conf", ConfigFromString(config_string=USE_OS_RELEASE_PRODUCT_ENABLED)) + def test_use_os_release_product_is_enabled(self): + update_action = RepoUpdateActionCommand() + enabled = update_action.use_os_release_product_enabled() + self.assertTrue(enabled) + def test_tags_found(self): update_action = RepoUpdateActionCommand() content = update_action.get_unique_content() @@ -1254,6 +1266,16 @@ def test_empty_manage_repos_int_37(self): auto_enable_yum_plugins = 0 """ +USE_OS_RELEASE_PRODUCT_DISABLED = """ +[rhsm] +use_os_release_product = 0 +""" + +USE_OS_RELEASE_PRODUCT_ENABLED = """ +[rhsm] +use_os_release_product = 1 +""" + PKG_PLUGIN_CONF_FILE_ENABLED_INT = """ [main] enabled = 1