From 7e8efcd4d9cd98f0f22be40249959b81c91fed00 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 19 Aug 2007 12:37:00 +0000 Subject: Fixed #5087 -- Fixed support for TextField filtering with Oracle. Thanks, Ian Kelly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5943 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/string_lookup/models.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/string_lookup/models.py b/tests/regressiontests/string_lookup/models.py index 6a341070a4..12ebd0cf07 100644 --- a/tests/regressiontests/string_lookup/models.py +++ b/tests/regressiontests/string_lookup/models.py @@ -36,6 +36,13 @@ class Base(models.Model): def __unicode__(self): return "Base %s" % self.name +class Article(models.Model): + name = models.CharField(maxlength = 50) + text = models.TextField() + + def __str__(self): + return "Article %s" % self.name + __test__ = {'API_TESTS': ur""" # Regression test for #1661 and #1662: Check that string form referencing of # models works, both as pre and post reference, on all RelatedField types. @@ -82,4 +89,13 @@ __test__ = {'API_TESTS': ur""" # We can also do the above query using UTF-8 strings. >>> Foo.objects.get(friend__contains='\xc3\xa7') + +# Regression tests for #5087: make sure we can perform queries on TextFields. +>>> a = Article(name='Test', text='The quick brown fox jumps over the lazy dog.') +>>> a.save() +>>> Article.objects.get(text__exact='The quick brown fox jumps over the lazy dog.') + + +>>> Article.objects.get(text__contains='quick brown fox') + """} -- cgit v1.3