diff --git a/robottelo/cli/simple_content_access.py b/robottelo/cli/simple_content_access.py index d5e471b824b..da741131d92 100644 --- a/robottelo/cli/simple_content_access.py +++ b/robottelo/cli/simple_content_access.py @@ -27,10 +27,15 @@ class SimpleContentAccess(Base): command_base = 'simple-content-access' @classmethod - def disable(cls, options=None, timeout=None): + def disable(cls, options=None, timeout=None, return_raw_response=False): """Disable simple content access for a manifest""" cls.command_sub = 'disable' - return cls.execute(cls._construct_command(options), ignore_stderr=True, timeout=timeout) + return cls.execute( + cls._construct_command(options), + ignore_stderr=True, + timeout=timeout, + return_raw_response=return_raw_response, + ) @classmethod def enable(cls, options=None, timeout=None): diff --git a/tests/foreman/cli/test_subscription.py b/tests/foreman/cli/test_subscription.py index c6d053a4659..90106c867bc 100644 --- a/tests/foreman/cli/test_subscription.py +++ b/tests/foreman/cli/test_subscription.py @@ -277,3 +277,29 @@ def test_positive_auto_attach_disabled_golden_ticket( with pytest.raises(CLIReturnCodeError) as context: target_sat.cli.Host.subscription_auto_attach({'host-id': host_id}) assert "This host's organization is in Simple Content Access mode" in str(context.value) + + +@pytest.mark.tier2 +def test_positive_prepare_for_sca_only_hammer(function_org, target_sat): + """Verify that upon certain actions, Hammer notifies users that Simple Content Access + will be required for all organizations in the next release + + :id: d9985a84-883f-46e7-8352-dbb849dbfa34 + + :expectedresults: Hammer returns a message notifying users that Simple Content Access + will be required for all organizations in the next release + """ + org_results = target_sat.cli.Org.update( + {'simple-content-access': 'false', 'id': function_org.id}, return_raw_response=True + ) + assert ( + 'Simple Content Access will be required for all organizations in the next release' + in str(org_results.stderr) + ) + sca_results = target_sat.cli.SimpleContentAccess.disable( + {'organization-id': function_org.id}, return_raw_response=True + ) + assert ( + 'Simple Content Access will be required for all organizations in the next release' + in str(sca_results.stderr) + )