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
|
||||||
|
|
|
@ -827,29 +827,29 @@ discovered, please follow these guidelines:
|
||||||
have a reversion policy doesn't relax your responsibility to aim for
|
have a reversion policy doesn't relax your responsibility to aim for
|
||||||
the highest quality possible. Really: double-check your work before
|
the highest quality possible. Really: double-check your work before
|
||||||
you commit it in the first place!
|
you commit it in the first place!
|
||||||
|
|
||||||
* If possible, have the original author revert his/her own commit.
|
* If possible, have the original author revert his/her own commit.
|
||||||
|
|
||||||
* Don't revert another author's changes without permission from the
|
* Don't revert another author's changes without permission from the
|
||||||
original author.
|
original author.
|
||||||
|
|
||||||
* If the original author can't be reached (within a reasonable amount
|
* If the original author can't be reached (within a reasonable amount
|
||||||
of time -- a day or so) and the problem is severe -- crashing bug,
|
of time -- a day or so) and the problem is severe -- crashing bug,
|
||||||
major test failures, etc -- then ask for objections on django-dev
|
major test failures, etc -- then ask for objections on django-dev
|
||||||
then revert if there are none.
|
then revert if there are none.
|
||||||
|
|
||||||
* If the problem is small (a feature commit after feature freeze,
|
* If the problem is small (a feature commit after feature freeze,
|
||||||
say), wait it out.
|
say), wait it out.
|
||||||
|
|
||||||
* If there's a disagreement between the committer and the
|
* If there's a disagreement between the committer and the
|
||||||
reverter-to-be then try to work it out on the `django-developers`_
|
reverter-to-be then try to work it out on the `django-developers`_
|
||||||
mailing list. If an agreement can't be reached then it should
|
mailing list. If an agreement can't be reached then it should
|
||||||
be put to a vote.
|
be put to a vote.
|
||||||
|
|
||||||
* If the commit introduced a confirmed, disclosed security
|
* If the commit introduced a confirmed, disclosed security
|
||||||
vulnerability then the commit may be reverted immediately without
|
vulnerability then the commit may be reverted immediately without
|
||||||
permission from anyone.
|
permission from anyone.
|
||||||
|
|
||||||
* The release branch maintainer may back out commits to the release
|
* The release branch maintainer may back out commits to the release
|
||||||
branch without permission if the commit breaks the release branch.
|
branch without permission if the commit breaks the release branch.
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
@ -1230,9 +1214,9 @@ voting mechanism above. A proposition will be considered carried by the core tea
|
||||||
if:
|
if:
|
||||||
|
|
||||||
* There are three "+1" votes from members of the core team.
|
* There are three "+1" votes from members of the core team.
|
||||||
|
|
||||||
* There is no "-1" vote from any member of the core team.
|
* There is no "-1" vote from any member of the core team.
|
||||||
|
|
||||||
* The BDFLs haven't stepped in and executed their positive or negative
|
* The BDFLs haven't stepped in and executed their positive or negative
|
||||||
veto.
|
veto.
|
||||||
|
|
||||||
|
@ -1259,7 +1243,7 @@ Core committers
|
||||||
codebase, a solid track record of being polite and helpful on the
|
codebase, a solid track record of being polite and helpful on the
|
||||||
mailing lists, and a proven desire to dedicate serious time to Django's
|
mailing lists, and a proven desire to dedicate serious time to Django's
|
||||||
development. The bar is high for full commit access.
|
development. The bar is high for full commit access.
|
||||||
|
|
||||||
Partial committers
|
Partial committers
|
||||||
These are people who are "domain experts." They have direct check-in access
|
These are people who are "domain experts." They have direct check-in access
|
||||||
to the subsystems that fall under their jurisdiction, and they're given a
|
to the subsystems that fall under their jurisdiction, and they're given a
|
||||||
|
|
|
@ -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