Django

Code

Changeset 3771

Show
Ignore:
Timestamp:
09/21/06 06:19:34 (2 years ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/contributing.txt

    r3688 r3771  
    248248The tests cover: 
    249249 
    250     * Models and the database API (``tests/testapp/models``). 
    251     * The cache system (``tests/otherthests/cache.py``). 
    252     * The ``django.utils.dateformat`` module (``tests/othertests/dateformat.py``). 
    253     * Database typecasts (``tests/othertests/db_typecasts.py``). 
    254     * The template system (``tests/othertests/templates.py`` and 
    255       ``tests/othertests/defaultfilters.py``). 
    256     * ``QueryDict`` objects (``tests/othertests/httpwrappers.py``). 
    257     * Markup template tags (``tests/othertests/markup.py``). 
    258     * The ``django.utils.timesince`` module (``tests/othertests/timesince.py``). 
     250    * Models and the database API (``tests/modeltests/``). 
     251    * The cache system (``tests/regressiontests/cache.py``). 
     252    * The ``django.utils.dateformat`` module (``tests/regressiontests/dateformat/``). 
     253    * Database typecasts (``tests/regressiontests/db_typecasts/``). 
     254    * The template system (``tests/regressiontests/templates/`` and 
     255      ``tests/regressiontests/defaultfilters/``). 
     256    * ``QueryDict`` objects (``tests/regressiontests/httpwrappers/``). 
     257    * Markup template tags (``tests/regressiontests/markup/``). 
    259258 
    260259We appreciate any and all contributions to the test suite! 
     260 
     261The Django tests all use the testing infrastructure that ships with Django for 
     262testing applications. See `Testing Django Applications`_ for an explanation of 
     263how to write new tests. 
     264 
     265.. _Testing Django Applications: http://www.djangoproject.com/documentation/testing/ 
    261266 
    262267Running the unit tests 
     
    269274Yes, the unit tests need a settings module, but only for database connection 
    270275info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``. 
    271  
    272 The unit tests will not touch your database; they create a new database, called 
    273 ``django_test_db``, which is deleted when the tests are finished. This means 
    274 your user account needs permission to execute ``CREATE DATABASE``. 
     276You will also need a ``ROOT_URLCONF`` setting (it's value is ignored; it just 
     277needs to be present) and a ``SITE_ID`` setting (any integer value will do) in 
     278order for all the tests to pass. 
     279 
     280The unit tests will not touch your existing databases; they create a new 
     281database, called ``django_test_db``, which is deleted when the tests are 
     282finished. This means your user account needs permission to execute ``CREATE 
     283DATABASE``. 
    275284 
    276285Requesting features