コード例 #1
0
def test_rhsm_stage_legacy_url(set_auto_configuration, initConfig):
    '''
    Ensure the correct host URL is selected for auto_config on a legacy staging RHSM upload

    This will still force legacy_upload=False as there is no classic staging env,
    so the result is the same as platform upload.

    '''
    initConfig().get.side_effect = [
        'subscription.rhsm.stage.redhat.com', '443', '', '', '', '', ''
    ]
    config = Mock(base_url=None, upload_url=None, legacy_upload=True)
    _try_satellite6_configuration(config)
    # config.legacy_upload is modified in the function
    config.legacy_upload = False
    set_auto_configuration.assert_called_with(config,
                                              'cert.cloud.stage.redhat.com',
                                              None, None, False, True)