Ticket #6298: django_6298.diff

File django_6298.diff, 2.0 KB (added by ericholscher, 6 years ago)

Added docs to the settings file. Wrap docs.

  • docs/internals/contributing.txt

    diff --git a/docs/internals/contributing.txt b/docs/internals/contributing.txt
    index 8258c5e..05fb040 100644
    a b following is a minimal settings file that can be used to test SQLite:: 
    826826        }
    827827    }
    828828
     829As a convenience, this settings file is included in your Django
     830distribution. It is called ``test_sqlite`, and is included in
     831the ``tests`` directory. This allows you to get started running
     832the tests against the sqlite database without doing anything on
     833your filesystem. However it should be noted that running against
     834other database backends is recommended for certain types of test
     835cases.
     836
     837To run the tests with this included settings file, ``cd``
     838to the ``tests/`` directory and type:
     839
     840.. code-block:: bash
     841
     842    ./runtests.py --settings=test_sqlite
    829843
    830844If you're using another backend, you will need to provide other details for
    831845each database:
  • new file tests/test_sqlite.py

    diff --git a/tests/test_sqlite.py b/tests/test_sqlite.py
    new file mode 100644
    index 0000000..774688c
    - +  
     1# This is an example test settings file for use with the Django test suite.
     2#
     3# The 'sqlite3' backend requires only the ENGINE setting (an in-
     4# memory database will be used).  All other backends will require a
     5# NAME and potentially authentication information.  See the
     6# following section in the docs for more information:
     7#
     8# http://docs.djangoproject.com/en/dev/internals/contributing/#unit-tests
     9#
     10# The different databases that Django supports behave differently in certain
     11# situations, so it is recommended to run the test suite against as many
     12# database backends as possible.  You may want to create a separate settings
     13# file for each of the backends you test against.
     14
     15DATABASES = {
     16    'default': {
     17            'ENGINE': 'django.db.backends.sqlite3',
     18    },
     19    'other': {
     20            'ENGINE': 'django.db.backends.sqlite3',
     21            'TEST_NAME': 'other_db',
     22    }
     23}
Back to Top