From 28768238b7a1e7e680f33de776a74ce62dc263ab Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Tue, 21 Oct 2025 13:00:47 -0500 Subject: [PATCH] fix: add plugin_settings function in test settings --- openedx_authz/settings/test.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/openedx_authz/settings/test.py b/openedx_authz/settings/test.py index fd30bb51..2cb8c038 100644 --- a/openedx_authz/settings/test.py +++ b/openedx_authz/settings/test.py @@ -6,11 +6,18 @@ from openedx_authz import ROOT_DIRECTORY -# Add Casbin configuration -CASBIN_MODEL = os.path.join(ROOT_DIRECTORY, "engine", "config", "model.conf") -# Redis host and port are temporarily loaded here for the MVP -REDIS_HOST = "redis" -REDIS_PORT = 6379 + +def plugin_settings(settings): # pylint: disable=unused-argument + """ + Configure plugin settings for Open edX. + This function is called by the Open edX plugin system to configure + the Django settings for this plugin. + + Args: + settings: The Django settings object + """ + + DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", @@ -55,6 +62,13 @@ ] SECRET_KEY = "test-secret-key" -CASBIN_WATCHER_ENABLED = False + USE_TZ = True + ROOT_URLCONF = "openedx_authz.urls" + +# Casbin configuration +CASBIN_MODEL = os.path.join(ROOT_DIRECTORY, "engine", "config", "model.conf") +CASBIN_WATCHER_ENABLED = False +REDIS_HOST = "redis" +REDIS_PORT = 6379