apps.common.tests.base.GenericViewTestCase doesn't work with a custom ROOT_URLCONF
If you attempt to run the tests with a different root urls.py
by setting ROOT_URLCONF
in your settings file, then tests fail because apps.common.tests.base.GenericViewTestCase
does from mayan.urls import urlpatterns
directly and then inserts the TEST_VIEW_NAME
view.
If mayan.urls
isn't the ROOT_URLCONF
then inserting the view doesn't make it available to Django, and to the tests fail at reverse(viewname=viewname, *args, **kwargs)
in GenericViewTestCase.get()
.
I think it would be more compatible if we do:
root_urlconf = importlib.import_module(settings.ROOT_URLCONF)
urlpatterns = root_urlconf.patterns