Corrected the way databases were compared. This allows running the test suite with two in memory SQLite databases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f777ddf3e6
commit
49d831380f
|
@ -24,7 +24,7 @@ class BaseDatabaseWrapper(local):
|
||||||
self.use_debug_cursor = None
|
self.use_debug_cursor = None
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.settings_dict == other.settings_dict
|
return self.alias == other.alias
|
||||||
|
|
||||||
def __ne__(self, other):
|
def __ne__(self, other):
|
||||||
return not self == other
|
return not self == other
|
||||||
|
|
|
@ -892,28 +892,12 @@ info. Your :setting:`DATABASES` setting needs to define two databases:
|
||||||
want. It doesn't need to use the same backend as the ``default``
|
want. It doesn't need to use the same backend as the ``default``
|
||||||
database (although it can use the same backend if you want to).
|
database (although it can use the same backend if you want to).
|
||||||
|
|
||||||
If you're using the SQLite database backend, you need to define
|
As a convenience, a minimal settings file, using two in memory SQLite
|
||||||
:setting:`ENGINE` for both databases, plus a
|
databases, is included in your Django distribution. It is called
|
||||||
:setting:`TEST_NAME` for the ``other`` database. The
|
``test_sqlite``, and is included in the ``tests`` directory. This allows you to
|
||||||
following is a minimal settings file that can be used to test SQLite::
|
get started running the tests against the sqlite database without doing
|
||||||
|
anything on your filesystem. However it should be noted that running against
|
||||||
DATABASES = {
|
other database backends is recommended for certain types of test cases.
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3'
|
|
||||||
},
|
|
||||||
'other': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'TEST_NAME': 'other_db'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 run the tests with this included settings file, ``cd``
|
||||||
to the ``tests/`` directory and type:
|
to the ``tests/`` directory and type:
|
||||||
|
|
|
@ -18,6 +18,5 @@ DATABASES = {
|
||||||
},
|
},
|
||||||
'other': {
|
'other': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'TEST_NAME': 'other_db'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue