def METHOD_NAME(oauth2_settings, rf, settings, oidc_only_view):
    assert oauth2_settings.OIDC_ENABLED is False
    settings.DEBUG = True
    with pytest.raises(ImproperlyConfigured) as exc:
        oidc_only_view(rf.get("/"))
    assert "OIDC views are not enabled" in str(exc.value)