From 2c22f08657a494733b487877c8a97810cff1ef16 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Mon, 22 Oct 2007 22:04:00 +0000 Subject: [PATCH] Changed field to "def_date" from "date" in new tests from [6568] so we can run the test suite against Oracle again. Refs #4140. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6595 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/regressiontests/forms/models.py b/tests/regressiontests/forms/models.py index 71dfff0a80..1a6f566b6b 100644 --- a/tests/regressiontests/forms/models.py +++ b/tests/regressiontests/forms/models.py @@ -7,7 +7,7 @@ class BoundaryModel(models.Model): class Defaults(models.Model): name = models.CharField(max_length=256, default='class default value') - date = models.DateField(default = datetime.date(1980, 1, 1)) + def_date = models.DateField(default = datetime.date(1980, 1, 1)) value = models.IntegerField(default=42) __test__ = {'API_TESTS': """ @@ -31,18 +31,18 @@ initial values. >>> DefaultsForm = form_for_model(Defaults) >>> DefaultsForm().fields['name'].initial u'class default value' ->>> DefaultsForm().fields['date'].initial +>>> DefaultsForm().fields['def_date'].initial datetime.date(1980, 1, 1) >>> DefaultsForm().fields['value'].initial 42 In form_for_instance(), the initial values come from the instance's values, not the model's defaults. ->>> foo_instance = Defaults(name=u'instance value', date = datetime.date(1969, 4, 4), value = 12) +>>> foo_instance = Defaults(name=u'instance value', def_date = datetime.date(1969, 4, 4), value = 12) >>> InstanceForm = form_for_instance(foo_instance) >>> InstanceForm().fields['name'].initial u'instance value' ->>> InstanceForm().fields['date'].initial +>>> InstanceForm().fields['def_date'].initial datetime.date(1969, 4, 4) >>> InstanceForm().fields['value'].initial 12