def _urlconf_teardown(self): if hasattr(self, '_old_root_urlconf'): settings.ROOT_URLCONF = self._old_root_urlconf clear_url_caches()
def tearDown(self): # Make sure we will leave an empty cache for other testcases. clear_url_caches()
def _urlconf_setup(self): if hasattr(self, 'urls'): self._old_root_urlconf = settings.ROOT_URLCONF settings.ROOT_URLCONF = self.urls clear_url_caches()
def setUp(self): # Make sure the cache is empty before we are doing our tests. clear_url_caches()