Author: jezdez
Date: 2010-02-23 14:45:50 -0600 (Tue, 23 Feb 2010)
New Revision: 12547

Added:
   django/trunk/tests/test_sqlite.py
Modified:
   django/trunk/docs/internals/contributing.txt
Log:
Fixed #6298 - Added sample settings file to run the Django test suite (SQLite). 
Thanks, Eric Holscher.

Modified: django/trunk/docs/internals/contributing.txt
===================================================================
--- django/trunk/docs/internals/contributing.txt        2010-02-23 20:45:28 UTC 
(rev 12546)
+++ django/trunk/docs/internals/contributing.txt        2010-02-23 20:45:50 UTC 
(rev 12547)
@@ -826,7 +826,21 @@
         }
     }
 
+As a convenience, this settings file is included in your Django
+distribution. It is called ``test_sqlite`, and is included in
+the ``tests`` directory. This allows you to get started running
+the tests against the sqlite database without doing anything on
+your filesystem. However it should be noted that running against
+other database backends is recommended for certain types of test
+cases.
 
+To run the tests with this included settings file, ``cd``
+to the ``tests/`` directory and type:
+
+.. code-block:: bash
+
+    ./runtests.py --settings=test_sqlite
+
 If you're using another backend, you will need to provide other details for
 each database:
 

Added: django/trunk/tests/test_sqlite.py
===================================================================
--- django/trunk/tests/test_sqlite.py                           (rev 0)
+++ django/trunk/tests/test_sqlite.py   2010-02-23 20:45:50 UTC (rev 12547)
@@ -0,0 +1,23 @@
+# This is an example test settings file for use with the Django test suite.
+#
+# The 'sqlite3' backend requires only the ENGINE setting (an in-
+# memory database will be used). All other backends will require a
+# NAME and potentially authentication information. See the
+# following section in the docs for more information:
+#
+# http://docs.djangoproject.com/en/dev/internals/contributing/#unit-tests
+#
+# The different databases that Django supports behave differently in certain
+# situations, so it is recommended to run the test suite against as many
+# database backends as possible.  You may want to create a separate settings
+# file for each of the backends you test against.
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3'
+    },
+    'other': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'TEST_NAME': 'other_db'
+    }
+}

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to