Permalink
Browse files

Non-failing test case

  • Loading branch information...
1 parent 6bb85d9 commit fa76c9ee0d9847ea357b8b1be7f3c786255713f5 @akaariai committed May 16, 2012
Showing with 16 additions and 1 deletion.
  1. +12 −0 tests/regressiontests/queries/models.py
  2. +4 −1 tests/regressiontests/queries/tests.py
@@ -346,3 +346,15 @@ class OneToOneCategory(models.Model):
def __unicode__(self):
return "one2one " + self.new_name
+
+class Ticket18324(models.Model):
+ field1 = models.CharField(max_length=100, blank=True, null=True,
+ default='')
+ field2 = models.CharField(max_length=100, blank=True, null=True,
+ default='')
+ field3 = models.CharField(max_length=100, blank=True, null=True,
+ default='')
+
+ class Meta:
+ db_table = 'some_model'
+ ordering = ['field1'] # This should cause errors.
@@ -18,7 +18,7 @@
ManagedModel, Member, NamedCategory, Note, Number, Plaything, PointerA,
Ranking, Related, Report, ReservedName, Tag, TvChef, Valid, X, Food, Eaten,
Node, ObjectA, ObjectB, ObjectC, CategoryItem, SimpleCategory,
- SpecialCategory, OneToOneCategory)
+ SpecialCategory, OneToOneCategory, Ticket18324)
class BaseQuerysetTest(TestCase):
@@ -1639,6 +1639,9 @@ def test_flat_values_lits(self):
qs, [72]
)
+ def test_ordering(self):
+ print Ticket18324.objects.values('field1').query
+
class WeirdQuerysetSlicingTests(BaseQuerysetTest):
def setUp(self):

0 comments on commit fa76c9e

Please sign in to comment.