def test_detach_from_LoginProfile(self): _source_ctx, _target_ctx, _ctx = self._create_common_relationships( 'test_detach_from', USER_TH, ['cloudify.nodes.Root', 'cloudify.nodes.aws.iam.LoginProfile'] ) current_ctx.set(_ctx) self.fake_client.delete_login_profile = MagicMock(return_value={}) user.detach_from( ctx=_ctx, resource_config=None, iface=None ) self.fake_client.delete_login_profile.assert_called_with( UserName='******' ) self.assertEqual( _source_ctx.instance.runtime_properties, { '_set_changed': True, 'aws_resource_id': 'aws_resource_mock_id', 'resource_config': {}, 'resource_id': 'prepare_attach_source' } )
def test_detach_from_LoginProfile(self): _source_ctx, _target_ctx, _ctx = self._create_common_relationships( 'test_detach_from', USER_TH, ['cloudify.nodes.Root', 'cloudify.nodes.aws.iam.LoginProfile'] ) current_ctx.set(_ctx) self.fake_client.delete_login_profile = MagicMock(return_value={}) user.detach_from( ctx=_ctx, resource_config=None, iface=None ) self.fake_client.delete_login_profile.assert_called_with( UserName='******' ) self.assertEqual( _source_ctx.instance.runtime_properties, { '_set_changed': True, 'aws_resource_id': 'aws_resource_mock_id', 'resource_config': {}, 'resource_id': 'prepare_attach_source' } )