diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-08-19 12:37:00 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-08-19 12:37:00 +0000 |
| commit | 7e8efcd4d9cd98f0f22be40249959b81c91fed00 (patch) | |
| tree | d9624c6739cd6685ee4dd8e0bf4b2fb0a8c6a797 /tests/regressiontests | |
| parent | e0c1ca7ef0e883eb33c2d1ab34f1ab8ae9e67266 (diff) | |
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
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/string_lookup/models.py | 16 |
1 files changed, 16 insertions, 0 deletions
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') <Foo: Foo Bjorn> + +# 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: Article Test> + +>>> Article.objects.get(text__contains='quick brown fox') +<Article: Article Test> """} |
