Code

Ticket #6298: django_6298.3.diff

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

Fix spacing in settings file.

Line 
1diff --git a/docs/internals/contributing.txt b/docs/internals/contributing.txt
2index 8258c5e..05fb040 100644
3--- a/docs/internals/contributing.txt
4+++ b/docs/internals/contributing.txt
5@@ -826,6 +826,20 @@ following is a minimal settings file that can be used to test SQLite::
6         }
7     }
8 
9+As a convenience, this settings file is included in your Django
10+distribution. It is called ``test_sqlite`, and is included in
11+the ``tests`` directory. This allows you to get started running
12+the tests against the sqlite database without doing anything on
13+your filesystem. However it should be noted that running against
14+other database backends is recommended for certain types of test
15+cases.
16+
17+To run the tests with this included settings file, ``cd``
18+to the ``tests/`` directory and type:
19+
20+.. code-block:: bash
21+
22+    ./runtests.py --settings=test_sqlite
23 
24 If you're using another backend, you will need to provide other details for
25 each database:
26diff --git a/tests/test_sqlite.py b/tests/test_sqlite.py
27new file mode 100644
28index 0000000..3159c5e
29--- /dev/null
30+++ b/tests/test_sqlite.py
31@@ -0,0 +1,23 @@
32+# This is an example test settings file for use with the Django test suite.
33+#
34+# The 'sqlite3' backend requires only the ENGINE setting (an in-
35+# memory database will be used).  All other backends will require a
36+# NAME and potentially authentication information.  See the
37+# following section in the docs for more information:
38+#
39+# http://docs.djangoproject.com/en/dev/internals/contributing/#unit-tests
40+#
41+# The different databases that Django supports behave differently in certain
42+# situations, so it is recommended to run the test suite against as many
43+# database backends as possible.  You may want to create a separate settings
44+# file for each of the backends you test against.
45+
46+DATABASES = {
47+    'default': {
48+        'ENGINE': 'django.db.backends.sqlite3'
49+    },
50+    'other': {
51+        'ENGINE': 'django.db.backends.sqlite3',
52+        'TEST_NAME': 'other_db'
53+    }
54+}