Skip to content

apphook urlpattern leakage in testsuite #1552

stefanfoulis opened this Issue Dec 9, 2012 · 1 comment

3 participants

Divio AG member

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 in and 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
Divio AG member
digi604 commented Feb 10, 2014

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 Feb 10, 2014
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.