Fixed #21774 -- Isolate all test urls from eachother.

This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:

- d.c.auth depends on d.c.admin (because of the is_admin flag to some
  views), but this is not so important and d.c.admin is in
  always_installed_apps
- test_client_regress depends on test_client. Eventually these should
  become a single module, as the split serves no useful purpose.
This commit is contained in:
Marc Tamlyn 2014-01-14 15:43:27 +00:00
parent ac8d0a4815
commit 2607fa9016
24 changed files with 397 additions and 350 deletions

View file

@ -1542,6 +1542,7 @@ class ArgumentOrder(AdminScriptTestCase):
class StartProject(LiveServerTestCase, AdminScriptTestCase):
urls = 'admin_scripts.urls'
available_apps = [
'admin_scripts',
'django.contrib.auth',
@ -1649,7 +1650,7 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
def test_custom_project_template_from_tarball_by_url(self):
"Make sure the startproject management command is able to use a different project template from a tarball via a url"
template_url = '%s/admin_scripts/custom_templates/project_template.tgz' % self.live_server_url
template_url = '%s/custom_templates/project_template.tgz' % self.live_server_url
args = ['startproject', '--template', template_url, 'urltestproject']
testproject_dir = os.path.join(test_dir, 'urltestproject')
@ -1662,7 +1663,7 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
def test_project_template_tarball_url(self):
"Startproject management command handles project template tar/zip balls from non-canonical urls"
template_url = '%s/admin_scripts/custom_templates/project_template.tgz/' % self.live_server_url
template_url = '%s/custom_templates/project_template.tgz/' % self.live_server_url
args = ['startproject', '--template', template_url, 'urltestproject']
testproject_dir = os.path.join(test_dir, 'urltestproject')