Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Corrected the way databases were compared. This allows running the te…

…st suite with two in memory SQLite databases.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 49d831380f81c07c35e146bd6c2911a60d87c2f0 1 parent f777ddf
Alex Gaynor authored November 19, 2010
2  django/db/backends/__init__.py
@@ -24,7 +24,7 @@ def __init__(self, settings_dict, alias=DEFAULT_DB_ALIAS):
24 24
         self.use_debug_cursor = None
25 25
 
26 26
     def __eq__(self, other):
27  
-        return self.settings_dict == other.settings_dict
  27
+        return self.alias == other.alias
28 28
 
29 29
     def __ne__(self, other):
30 30
         return not self == other
48  docs/internals/contributing.txt
@@ -827,29 +827,29 @@ discovered, please follow these guidelines:
827 827
       have a reversion policy doesn't relax your responsibility to aim for
828 828
       the highest quality possible. Really: double-check your work before
829 829
       you commit it in the first place!
830  
-      
  830
+
831 831
     * If possible, have the original author revert his/her own commit.
832  
-      
  832
+
833 833
     * Don't revert another author's changes without permission from the
834 834
       original author.
835  
-      
  835
+
836 836
     * If the original author can't be reached (within a reasonable amount
837 837
       of time -- a day or so) and the problem is severe -- crashing bug,
838 838
       major test failures, etc -- then ask for objections on django-dev
839 839
       then revert if there are none.
840  
-      
  840
+
841 841
     * If the problem is small (a feature commit after feature freeze,
842 842
       say), wait it out.
843  
-      
  843
+
844 844
     * If there's a disagreement between the committer and the
845 845
       reverter-to-be then try to work it out on the `django-developers`_
846 846
       mailing list. If an agreement can't be reached then it should
847 847
       be put to a vote.
848  
-      
  848
+
849 849
     * If the commit introduced a confirmed, disclosed security
850 850
       vulnerability then the commit may be reverted immediately without
851 851
       permission from anyone.
852  
-    
  852
+
853 853
     * The release branch maintainer may back out commits to the release
854 854
       branch without permission if the commit breaks the release branch.
855 855
 
@@ -892,28 +892,12 @@ info. Your :setting:`DATABASES` setting needs to define two databases:
892 892
       want. It doesn't need to use the same backend as the ``default``
893 893
       database (although it can use the same backend if you want to).
894 894
 
895  
-If you're using the SQLite database backend, you need to define
896  
-:setting:`ENGINE` for both databases, plus a
897  
-:setting:`TEST_NAME` for the ``other`` database. The
898  
-following is a minimal settings file that can be used to test SQLite::
899  
-
900  
-    DATABASES = {
901  
-        'default': {
902  
-            'ENGINE': 'django.db.backends.sqlite3'
903  
-        },
904  
-        'other': {
905  
-            'ENGINE': 'django.db.backends.sqlite3',
906  
-            'TEST_NAME': 'other_db'
907  
-        }
908  
-    }
909  
-
910  
-As a convenience, this settings file is included in your Django
911  
-distribution. It is called ``test_sqlite``, and is included in
912  
-the ``tests`` directory. This allows you to get started running
913  
-the tests against the sqlite database without doing anything on
914  
-your filesystem. However it should be noted that running against
915  
-other database backends is recommended for certain types of test
916  
-cases.
  895
+As a convenience, a minimal settings file, using two in memory SQLite
  896
+databases, is included in your Django distribution. It is called
  897
+``test_sqlite``, and is included in the ``tests`` directory. This allows you to
  898
+get started running the tests against the sqlite database without doing
  899
+anything on your filesystem. However it should be noted that running against
  900
+other database backends is recommended for certain types of test cases.
917 901
 
918 902
 To run the tests with this included settings file, ``cd``
919 903
 to the ``tests/`` directory and type:
@@ -1230,9 +1214,9 @@ voting mechanism above. A proposition will be considered carried by the core tea
1230 1214
 if:
1231 1215
 
1232 1216
     * There are three "+1" votes from members of the core team.
1233  
-    
  1217
+
1234 1218
     * There is no "-1" vote from any member of the core team.
1235  
-    
  1219
+
1236 1220
     * The BDFLs haven't stepped in and executed their positive or negative
1237 1221
       veto.
1238 1222
 
@@ -1259,7 +1243,7 @@ Core committers
1259 1243
     codebase, a solid track record of being polite and helpful on the
1260 1244
     mailing lists, and a proven desire to dedicate serious time to Django's
1261 1245
     development. The bar is high for full commit access.
1262  
-    
  1246
+
1263 1247
 Partial committers
1264 1248
     These are people who are "domain experts." They have direct check-in access
1265 1249
     to the subsystems that fall under their jurisdiction, and they're given a
1  tests/test_sqlite.py
@@ -18,6 +18,5 @@
18 18
     },
19 19
     'other': {
20 20
         'ENGINE': 'django.db.backends.sqlite3',
21  
-        'TEST_NAME': 'other_db'
22 21
     }
23 22
 }

0 notes on commit 49d8313

Please sign in to comment.
Something went wrong with that request. Please try again.