Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

apphook urlpattern leakage in testsuite #1552

Open
stefanfoulis opened this Issue · 1 comment

2 participants

@stefanfoulis
Owner

loading apphooks happens at import time. since these urls depend on what is in the database, the same import cannot be used multiple times.

This is the reason for the copied versions of cms.urls.py in cms.test_utils.project.cms_urls_for_apphook_tests.py and cms.test_utils.project.second_cms_urls_for_apphook_tests.py. These imports can each only be used once.
I suspect there are a few testcases that just work by chance because they happen to be called in the right order.

One such case was cms.tests.views.ViewTests.test_edit_permission that worked when running the testcase alone, but failed when running with the whole testsuite.

We should find a way to:

  • use one shared urls file in the testproject that simple imports cms.urls instead of a bunch of copies
  • find a way to reset the discovered apphook urls for every testcase
@digi604
Collaborator

reseting the urls and apphook cache and reloading cms.urls actually works. There is a problem in py3k though with reloading of modules as there need to be zero pointers to the old modules to get reloaded like in py2

@digi604 digi604 added this to the Some Day milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.