Files
docs/src/backend/core/tests/utils/urls.py
Sylvain Boissel 4e54a53072 (backend) add resource server api
Adds a resource server API similar to the one that already
exists for Drive.
2026-03-18 16:06:29 +01:00

21 lines
537 B
Python

"""Utils for testing URLs."""
import importlib
from django.urls import clear_url_caches
def reload_urls():
"""
Reload the URLs. Since the URLs are loaded based on a
settings value, we need to reload them to make the
URL settings based condition effective.
"""
import core.urls # pylint:disable=import-outside-toplevel # noqa: PLC0415
import impress.urls # pylint:disable=import-outside-toplevel # noqa: PLC0415
importlib.reload(core.urls)
importlib.reload(impress.urls)
clear_url_caches()