Browse files

Removed the need for ROOT_URLCONF in settings when running Django's c…

…ore tests

(via It was embarrassing having to explain the need for it to
people, since we ignore whatever setting is passed in.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent fd0cc45 commit c0b53b3dcc817aa6522b4477f009e7c3bb83ae2e @malcolmt malcolmt committed Aug 30, 2008
Showing with 2 additions and 3 deletions.
  1. +1 −2 docs/internals/contributing.txt
  2. +1 −1 tests/
@@ -730,8 +730,7 @@ To run the tests, ``cd`` to the ``tests/`` directory and type:
Yes, the unit tests need a settings module, but only for database connection
-info, with the ``DATABASE_ENGINE`` setting. You'll also need a ``ROOT_URLCONF``
-setting (its value is ignored; it just needs to be present).
+info, with the ``DATABASE_ENGINE`` setting.
If you're using the ``sqlite3`` database backend, no further settings are
needed. A temporary database will be created in memory when running the tests.
@@ -90,7 +90,7 @@ def django_tests(verbosity, interactive, test_labels):
old_installed_apps = settings.INSTALLED_APPS
old_test_database_name = settings.TEST_DATABASE_NAME
- old_root_urlconf = settings.ROOT_URLCONF
+ old_root_urlconf = getattr(settings, "ROOT_URLCONF", "")
old_template_dirs = settings.TEMPLATE_DIRS
old_use_i18n = settings.USE_I18N
old_login_url = settings.LOGIN_URL

0 comments on commit c0b53b3

Please sign in to comment.