diff --git a/helpdesk/tests/helpers.py b/helpdesk/tests/helpers.py index 6dccad08..67715c90 100644 --- a/helpdesk/tests/helpers.py +++ b/helpdesk/tests/helpers.py @@ -26,8 +26,15 @@ def reload_urlconf(urlconf=None): from django.conf import settings urlconf = settings.ROOT_URLCONF - if urlconf in sys.modules: - from django.core.urlresolvers import clear_url_caches + if HELPDESK_URLCONF in sys.modules: + reload(sys.modules[HELPDESK_URLCONF]) + + if urlconf in sys.modules: reload(sys.modules[urlconf]) - clear_url_caches() + + from django.core.urlresolvers import clear_url_caches + clear_url_caches() + + +HELPDESK_URLCONF = 'helpdesk.urls'