Updated the settings variables required to run the internal test suite. Also

fixed up the paths to existing tests and added a link to the documentation for
writing new tests for Django itself.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3771 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2006-09-21 11:19:34 +00:00
parent a5f4a0255d
commit d411a9a777
1 changed files with 21 additions and 12 deletions

View File

@ -247,18 +247,23 @@ Django tarball. It's our policy to make sure all tests pass at all times.
The tests cover: The tests cover:
* Models and the database API (``tests/testapp/models``). * Models and the database API (``tests/modeltests/``).
* The cache system (``tests/otherthests/cache.py``). * The cache system (``tests/regressiontests/cache.py``).
* The ``django.utils.dateformat`` module (``tests/othertests/dateformat.py``). * The ``django.utils.dateformat`` module (``tests/regressiontests/dateformat/``).
* Database typecasts (``tests/othertests/db_typecasts.py``). * Database typecasts (``tests/regressiontests/db_typecasts/``).
* The template system (``tests/othertests/templates.py`` and * The template system (``tests/regressiontests/templates/`` and
``tests/othertests/defaultfilters.py``). ``tests/regressiontests/defaultfilters/``).
* ``QueryDict`` objects (``tests/othertests/httpwrappers.py``). * ``QueryDict`` objects (``tests/regressiontests/httpwrappers/``).
* Markup template tags (``tests/othertests/markup.py``). * Markup template tags (``tests/regressiontests/markup/``).
* The ``django.utils.timesince`` module (``tests/othertests/timesince.py``).
We appreciate any and all contributions to the test suite! We appreciate any and all contributions to the test suite!
The Django tests all use the testing infrastructure that ships with Django for
testing applications. See `Testing Django Applications`_ for an explanation of
how to write new tests.
.. _Testing Django Applications: http://www.djangoproject.com/documentation/testing/
Running the unit tests Running the unit tests
---------------------- ----------------------
@ -268,10 +273,14 @@ To run the tests, ``cd`` to the ``tests/`` directory and type::
Yes, the unit tests need a settings module, but only for database connection Yes, the unit tests need a settings module, but only for database connection
info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``. info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``.
You will also need a ``ROOT_URLCONF`` setting (it's value is ignored; it just
needs to be present) and a ``SITE_ID`` setting (any integer value will do) in
order for all the tests to pass.
The unit tests will not touch your database; they create a new database, called The unit tests will not touch your existing databases; they create a new
``django_test_db``, which is deleted when the tests are finished. This means database, called ``django_test_db``, which is deleted when the tests are
your user account needs permission to execute ``CREATE DATABASE``. finished. This means your user account needs permission to execute ``CREATE
DATABASE``.
Requesting features Requesting features
=================== ===================