657 | | The unit tests will not touch your existing databases; they create a new |
658 | | database, called ``django_test_db``, which is deleted when the tests are |
| 658 | If you use the ``sqlite3`` database engine, no further settings are needed and a |
| 659 | temporary database will be created in memory when running the tests. |
| 660 | |
| 661 | For other backends, the ``DATABASE_USER`` setting needs to specify an existing |
| 662 | user account for the database engine. The ``DATABASE_NAME`` setting must be the |
| 663 | name of an existing database to which the given user has permission to connect. |
| 664 | The unit tests will not touch that database; they create a new database which |
| 665 | has the same name prefixed with ``test_``, and it is deleted when the tests are |
| 669 | To run a subset of the unit tests, append the names of the test modules to the |
| 670 | ``runtests.py`` command line. See the list of directories in |
| 671 | ``tests/modeltests`` and ``tests/regressiontests`` for module names. |
| 672 | |
| 673 | As an example, if Django is not in your ``PYTHONPATH``, you placed |
| 674 | ``settings.py`` in the ``tests/`` directory, and you'd like to only run tests |
| 675 | for generic relations and internationalization, type:: |
| 676 | |
| 677 | PYTHONPATH=.. ./runtests.py --settings=settings generic_relations i18n |
| 678 | |