

def test_service_provider_disable(self):
    "Disable Service Provider\n\n        Set Service Provider's ``enabled`` attribute to False.\n        "

    def prepare(self):
        'Prepare fake return objects before the test is executed'
        updated_sp = copy.deepcopy(service_fakes.SERVICE_PROVIDER)
        updated_sp['enabled'] = False
        resources = fakes.FakeResource(None, updated_sp, loaded=True)
        self.service_providers_mock.update.return_value = resources
    prepare(self)
    arglist = ['--disable', service_fakes.sp_id]
    verifylist = [('service_provider', service_fakes.sp_id), ('enable', False), ('disable', True)]
    parsed_args = self.check_parser(self.cmd, arglist, verifylist)
    (columns, data) = self.cmd.take_action(parsed_args)
    self.service_providers_mock.update.assert_called_with(service_fakes.sp_id, enabled=False, description=None, auth_url=None, sp_url=None)
    self.assertEqual(arglist.columns, columns)
    self.assertEqual(self.datalist, data)

dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/tests/identity/v3/test_service_provider.py TestServiceProviderSet.test_service_provider_disable/VarMisuse@169/270 `self`->`arglist`