From b17f250907351923f39f8a50b87a35b26d2ca307 Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Mon, 4 Sep 2006 02:20:26 +0000 Subject: [multi-db] Merge trunk to [3661] git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3712 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/basic/models.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/modeltests/basic/models.py') diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py index 78d943eb97..acbea0d1e0 100644 --- a/tests/modeltests/basic/models.py +++ b/tests/modeltests/basic/models.py @@ -13,8 +13,7 @@ class Article(models.Model): def __str__(self): return self.headline -API_TESTS = """ - +__test__ = {'API_TESTS': """ # No articles are in the system yet. >>> Article.objects.all() [] @@ -314,14 +313,14 @@ AttributeError: Manager isn't accessible via Article instances >>> Article.objects.all() [, , , ] -""" +"""} from django.conf import settings building_docs = getattr(settings, 'BUILDING_DOCS', False) if building_docs or settings.DATABASE_ENGINE == 'postgresql': - API_TESTS += """ + __test__['API_TESTS'] += """ # In PostgreSQL, microsecond-level precision is available. >>> a9 = Article(headline='Article 9', pub_date=datetime(2005, 7, 31, 12, 30, 45, 180)) >>> a9.save() @@ -330,7 +329,7 @@ datetime.datetime(2005, 7, 31, 12, 30, 45, 180) """ if building_docs or settings.DATABASE_ENGINE == 'mysql': - API_TESTS += """ + __test__['API_TESTS'] += """ # In MySQL, microsecond-level precision isn't available. You'll lose # microsecond-level precision once the data is saved. >>> a9 = Article(headline='Article 9', pub_date=datetime(2005, 7, 31, 12, 30, 45, 180)) @@ -339,7 +338,7 @@ if building_docs or settings.DATABASE_ENGINE == 'mysql': datetime.datetime(2005, 7, 31, 12, 30, 45) """ -API_TESTS += """ +__test__['API_TESTS'] += """ # You can manually specify the primary key when creating a new object. >>> a101 = Article(id=101, headline='Article 101', pub_date=datetime(2005, 7, 31, 12, 30, 45)) -- cgit v1.3