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:
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