diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-12-22 15:18:51 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-12-22 15:18:51 +0000 |
| commit | ff60c5f9de3e8690d1e86f3e9e3f7248a15397c8 (patch) | |
| tree | a4cb0ebdd55fcaf8c8855231b6ad3e1a7bf45bee /tests/regressiontests/datatypes | |
| parent | 7ef212af149540aa2da577a960d0d87029fd1514 (diff) | |
Fixed #1142 -- Added multiple database support.
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.
Big thanks also go to:
* Justin Bronn for keeping GIS in line with the changes,
* Karen Tracey and Jani Tiainen for their help testing Oracle support
* Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
* Malcolm Treddinick for his guidance during the GSoC submission process.
* Simon Willison for driving the original design process
* Cal Henderson for complaining about ponies he wanted.
... and everyone else too numerous to mention that helped to bring this feature into fruition.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/datatypes')
| -rw-r--r-- | tests/regressiontests/datatypes/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/regressiontests/datatypes/models.py b/tests/regressiontests/datatypes/models.py index 0ad809a45d..f6cbc9f0f6 100644 --- a/tests/regressiontests/datatypes/models.py +++ b/tests/regressiontests/datatypes/models.py @@ -3,7 +3,7 @@ This is a basic model to test saving and loading boolean and date-related types, which in the past were problematic for some database backends. """ -from django.db import models +from django.db import models, DEFAULT_DB_ALIAS from django.conf import settings class Donut(models.Model): @@ -93,11 +93,11 @@ u'Outstanding' # Regression test for #8354: the MySQL backend should raise an error if given # a timezone-aware datetime object. -if settings.DATABASE_ENGINE == 'mysql': +if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] == 'django.db.backends.mysql': __test__['API_TESTS'] += """ ->>> from django.utils import tzinfo ->>> dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=tzinfo.FixedOffset(0)) ->>> d = Donut(name='Bear claw', consumed_at=dt) +>>> from django.utils import tzinfo +>>> dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=tzinfo.FixedOffset(0)) +>>> d = Donut(name='Bear claw', consumed_at=dt) >>> d.save() Traceback (most recent call last): .... |
