Skip to content

Commit

Permalink
Cleanup temporarily activated plugins after the test has completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jul 17, 2024
1 parent 0fb20ca commit 8111f14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kolibri/plugins/utils/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.conf import settings
from django.urls import clear_url_caches

from kolibri.plugins import config
from kolibri.plugins.registry import registered_plugins


Expand Down Expand Up @@ -42,8 +43,11 @@ def plugin_enabled(*plugin_names):
for plugin_name in plugin_names:
try:
del registered_plugins._apps[plugin_name]
if plugin_name in config["UPDATED_PLUGINS"]:
config["UPDATED_PLUGINS"].remove(plugin_name)
except KeyError:
pass
config.save()
_reset_plugin_dependent_modules()


Expand Down

0 comments on commit 8111f14

Please sign in to comment.