From 8b22f7cf78c0b66831e91e1d73d4be6e4a201f30 Mon Sep 17 00:00:00 2001 From: Ian Kelly Date: Tue, 8 Mar 2011 19:26:32 +0000 Subject: [PATCH] Fixed field names that were preventing the tests from running in Oracle. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15774 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/admin_views/models.py | 4 ++-- tests/regressiontests/queries/models.py | 2 +- tests/regressiontests/queries/tests.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py index 4c4e2907d7..220b4a3575 100644 --- a/tests/regressiontests/admin_views/models.py +++ b/tests/regressiontests/admin_views/models.py @@ -710,7 +710,7 @@ class Paper(models.Model): class CoverLetter(models.Model): author = models.CharField(max_length=30) - date = models.DateField(null=True, blank=True) + date_written = models.DateField(null=True, blank=True) def __unicode__(self): return self.author @@ -733,7 +733,7 @@ class CoverLetterAdmin(admin.ModelAdmin): def queryset(self, request): #return super(CoverLetterAdmin, self).queryset(request).only('author') - return super(CoverLetterAdmin, self).queryset(request).defer('date') + return super(CoverLetterAdmin, self).queryset(request).defer('date_written') class Story(models.Model): title = models.CharField(max_length=100) diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index d441433ba1..d1e5e6ea39 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -305,7 +305,7 @@ class ObjectA(models.Model): class ObjectB(models.Model): name = models.CharField(max_length=50) objecta = models.ForeignKey(ObjectA) - number = models.PositiveSmallIntegerField() + num = models.PositiveSmallIntegerField() def __unicode__(self): return self.name diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index 93e0845238..c13ca2c4b4 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -1675,7 +1675,7 @@ class UnionTests(unittest.TestCase): objectas.append(o) b_info = [('un', 1, objectas[0]), ('deux', 2, objectas[0]), ('trois', 3, objectas[2])] for name, number, objecta in b_info: - o = ObjectB(name=name, number=number, objecta=objecta) + o = ObjectB(name=name, num=number, objecta=objecta) o.save() objectbs.append(o) c_info = [('ein', objectas[2], objectbs[2]), ('zwei', objectas[1], objectbs[1])] @@ -1696,7 +1696,7 @@ class UnionTests(unittest.TestCase): def test_A_AB2(self): Q1 = Q(name='two') - Q2 = Q(objectb__name='deux', objectb__number=2) + Q2 = Q(objectb__name='deux', objectb__num=2) self.check_union(ObjectA, Q1, Q2) def test_AB_ACB(self): @@ -1718,4 +1718,3 @@ class UnionTests(unittest.TestCase): Q1 = Q(objecta__name='one', objectc__objecta__name='two') Q2 = Q(objecta__objectc__name='ein', objectc__objecta__name='three', objecta__objectb__name='trois') self.check_union(ObjectB, Q1, Q2) -