def METHOD_NAME(make_stubber, monkeypatch, error_code):
    s3_resource = boto3.resource('s3')
    s3_stubber = make_stubber(s3_resource.meta.client)
    user_key = MagicMock(id='test-access-key-id', secret='test-secret')
    def get_s3(client, aws_access_key_id, aws_secret_access_key):
        assert aws_access_key_id == user_key.id
        assert aws_secret_access_key == user_key.secret
        return s3_resource
    monkeypatch.setattr(boto3, 'resource', get_s3)
    s3_stubber.stub_list_buckets([], error_code)
    if error_code is None:
        with pytest.raises(RuntimeError):
            assume_role.show_access_denied_without_role(user_key)
    elif error_code == 'AccessDenied':
        assume_role.show_access_denied_without_role(user_key)
    elif error_code == 'TestException':
        with pytest.raises(ClientError):
            assume_role.show_access_denied_without_role(user_key)